Re: BUG #17800: ON CONFLICT DO UPDATE fails to detect incompatible fields that leads to a server crash
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Michael Paquier <michael@paquier.xyz>, exclusion@gmail.com,
pgsql-bugs@lists.postgresql.org
Date: 2023-02-25T20:55:50Z
Lists: pgsql-bugs
Andres Freund <andres@anarazel.de> writes: > Your commit message referenced commit 3f7323cbb, which contains: > That technique is borrowed from the far older code that supports > initplans, and it works okay in that case because the cloned SubPlan nodes > are essentially identical. So it doesn't matter which one of the clones > the shared ParamExecData.execPlan field might point to. Yeah, I now think that was a bit of a misstatement; not about the bug, but about what happens with initplans. > Out of curiosity: Are there cases where we actually overwrite execPlan for > initplans? I couldn't find any with a quick assertion. ISTM that that largely > should be prevented by initplans being initialized once, in ExecInitNode(). True. Even if an initplan is referenced in multiple places, it will be attached to just one plan node's initPlan list, so there should be only one time that execPlan gets set (per execution cycle of that node), and I think only one SubPlanState that it could point to. The references aren't SubPlan nodes, just Params. regards, tom lane
Commits
-
Fix MULTIEXPR_SUBLINK with partitioned target tables, yet again.
- ffec64ba86c4 11.20 landed
- a033f9165c2c 15.3 landed
- 9eaba06027ae 14.8 landed
- 904b171a4655 12.15 landed
- 87f3667ec079 16.0 landed
- 1e199c259947 13.11 landed
-
Repair rare failure of MULTIEXPR_SUBLINK subplans in inherited updates.
- 3f7323cbbdd3 13.9 cited