I think you are right after reading code in compute_parallel_vacuum_workers() :)
发件人: Tom Lane
发送时间: 2020年12月1日 2:54
收件人: Yulin PEI
抄送: Masahiko Sawada ; pgsql-hackers@lists.postgresql.org
主题: Re: 回复: [PATCH] BUG FIX: Core dump could happen when VACUUM FULL in
ne mode.
I think it is better not to use btree index build in parallel in stand-alone
mode. My patch is attached below.
Best Regards!
Yulin PEI
standalone_vacuum_full.patch
Description: standalone_vacuum_full.patch
Yes, I agree because (IsNormalProcessingMode() ) means that current process is
not in bootstrap mode and postmaster process will not build index.
So my new modified patch is attached.
发件人: Masahiko Sawada
发送时间: 2020年11月30日 17:27
收件人: Yulin PEI
抄送: pgsql
!OidIsValid(def->collOid));
```
I am not sure whether to fix this bug in function DefineVirtualRelation or to
fix this bug in parse tree and analyze procedure, so maybe we can discuss.
Best Regard!
Yulin PEI
After reading the code and the patch, I think the patch is good. If the
type is non-collatable, we do not add a CollateExpr node as a 'parent' node to
the coerced node.
发件人: Tom Lane
发送时间: 2021年4月13日 0:59
收件人: Yulin PEI
抄送: pgs
I think it is better to add this test case to regress.
发件人: Tom Lane
发送时间: 2021年4月13日 0:59
收件人: Yulin PEI
抄送: pgsql-hackers@lists.postgresql.org
主题: Re: Core dump happens when execute sql CREATE VIEW v1(c1) AS (SELECT ('4'
COLLATE "C")::INT
ent is all
digits.
So the attachment is my patch and it works well as far as I tested.
发件人: Tom Lane
发送时间: 2021年4月13日 0:59
收件人: Yulin PEI
抄送: pgsql-hackers@lists.postgresql.org
主题: Re: Core dump happens when execute sql CREATE VIEW v1(c1) AS (SELECT ('4
// We do not make a new CollateExpr here, but don't forget to coerce
coll->arg.
return coerce_type(pstate, (Node *) coll->arg,
inputTypeId, targetTypeId, targetTypeMod,
ccontext, cformat, location);
}
...
}
```
___