model-writtenrun 4693 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported an ON CONFLICT DO UPDATE crash when partitions have different column orders, alongside a plain UPDATE type error; Michael Paquier reproduced the problem #1 #2.
- Tom Lane traced both symptoms to cloned MULTIEXPR subplans sharing output parameters despite having differently adjusted argument lists, and explained why planner-only fixes would miss targetlists cloned during executor partition initialization #5 #7.
- Tom proposed expression-local parameter storage, while Andres Freund explored separate expression contexts; they concluded that the solution must also handle targetlists pushed into other plan nodes without requiring every surrounding node to understand the workaround #7 #9 #10 #12.
- Andres's first prototype selected subplans through a parameter-and-partition lookup table, but explicitly left the planner-expanded UPDATE case unresolved #16.
- Tom supplied a competing implementation using private MULTIEXPR output arrays that fixed both reported symptoms; Andres questioned its special-case storage and expression-compilation overhead #18 #19.
- Andres then proposed eliminating the ambiguous execPlan lookup by compiling subplan execution before parameter reads, and supplied a prototype using a new expression opcode; inlining argument evaluation was deliberately deferred #21 #22.
- Tom endorsed execution reordering but recommended reusing EEOP_SUBPLAN to avoid backpatch ABI concerns, and Andres handed over completion of the patch #23 #24.
- Tom's revised patch reused the existing opcode, moved MULTIEXPR execution into ExecScanSubPlan, removed obsolete lazy-execution machinery, and added regression coverage for inherited updates, partitioned updates, and ON CONFLICT #26.
- After Andres suggested naming and comment adjustments, Tom committed #26 with those light edits as 87f3667ec0 and confirmed completion; the commit credits both developers and records backpatching to all supported branches, including removal of superseded fixes in older branches while retaining an existing plan-node field for compatibility #27 #29 #30.
- After landing, Andres questioned an earlier explanation of initplan sharing, and Tom clarified that an initplan has one owning plan node and SubPlanState even when its output parameters are referenced elsewhere #31 #32.
- The bug fix was complete at thread end, while Andres linked separate follow-up work on argument evaluation and Tom offered a more careful review through the upcoming commitfest #33 #34.