model-writtenrun 7675 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jun - Aug 2020 · 7 entries
- Pavel Biryukov reported that INSERT ... RETURNING xmin on partitioned tables still failed in PostgreSQL 12.3, and Tom Lane reproduced it as a regression from earlier releases #1 #2.
- Soumyadeep Chakraborty traced the failure to virtual tuple slots lacking system attributes and submitted two alternatives: synthesize those attributes in a heap slot or fetch the inserted row through the table AM #5.
- Amit Langote proposed selecting heap slots for partitioned tables instead, but Soumyadeep tested that patch with Zedstore and obtained incorrect system-column values, showing that assuming heap behavior would not accommodate other storage engines #6 #7.
- Amit argued that each table AM should supply its own system attributes through slot callbacks, while Robert Haas questioned how a partition parent could expose consistent system columns across heterogeneous children and Tom objected to failures deep inside the executor #12 #14 #15.
- Andres Freund demonstrated that using a partition-specific slot restored the example and attached a patch allocating such slots whenever RETURNING was present, while noting unresolved trigger behavior and broader system-column semantics #20 #21.
- Pavel explained that Entity Framework used xmin for optimistic concurrency, and Andres identified wraparound and same-transaction limitations; Wilm Hoyer suggested an explicit version column, but Pavel objected to its storage cost and emphasized the regression #23 #24 #32 #33.
- Tom outlined a longer-term design in which partition parents declare supported system columns and incompatible children cannot be attached, with each AM supplying a fixed set of columns; this infrastructure remained a proposal #29 #38.
Oct - Dec 2020 · 1 entry
- In October, Amit revived Andres's workaround with separate HEAD and stable-branch patches, restricted extra slot allocation to RETURNING expressions that actually reference system columns, and added regression tests #40.
Mar - Apr 2021 · 5 entries
- After another quiet period, Amit posted v3 variants in March and reopened the question of forbidding system-column access through partition parents in HEAD #44.
- In April, Tom favored restricting partition-parent system columns because foreign partitions and alternate AMs invalidate uniform assumptions; Andres and Amit favored omitting unsupported catalog entries, while the treatment and future representation of ctid remained disputed #45 #46 #47 #50 #52.
- Tom then found that cross-partition UPDATE ... RETURNING xmin could crash in PostgreSQL 12 and 13 when a heap slot contained only virtual values; Andres proposed checking for a missing tuple, and Tom rejected materializing the slot because it produced incorrect xmin values #53 #54 #55.
- Tom posted a common user-facing error for unavailable system columns, Andres discussed its scope and remaining materialization concerns, and Tom committed that narrower crash-prevention fix with regression tests as d479d00285, including backports to PostgreSQL 12 and 13 #57 #58 #59.
- The thread ended with Amit thanking Tom for the fix; the crash protection had landed, while the attached patches restoring broader RETURNING support and the proposed redesign of partition-parent system columns had not landed through this commit #60.