model-writtenrun 7455 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
May - Jun 2020 · 4 entries
- Amit Langote proposed replacing one UPDATE/DELETE source plan per inheritance child with a single SELECT-like plan, motivated by excessive planning memory and time for thousands of partitions; ModifyTable would reconstruct updated rows and identify their destination using tableoid #1.
- Ashutosh Bapat raised execution-cost and foreign-table pushdown concerns, while Robert Haas and Tom Lane developed the idea of shared row-identity columns with NULLs for unrelated children and planner-only dummy parent columns #2 #4 #7.
- David Rowley proposed caching the last tableoid lookup or passing a result-relation index, and discussed lazy ResultRelInfo initialization; Amit deferred lazy initialization to separate work and retained Append for runtime pruning and partitionwise planning #12 #15 #17.
- Amit's first patch implemented tuple reconstruction and single-plan inherited modification, but foreign-table direct modification and whole-row handling remained problematic; he then split the implementation into two patches #19 #20.
Sep - Nov 2020 · 3 entries
- After several months, Amit restored direct modification for suitable foreign child scans, switched destination identification from tableoid to result-relation indexes, and added a ForeignScan prerequisite, while acknowledging that inherited modifications involving joins lost some pushdown opportunities #21.
- Amit rebased the series and benchmarked tuple reconstruction, finding small costs in some narrow-table cases and benefits for wider rows and joins; subsequent upstream executor changes reduced the series back to two patches #24 #25.
- Heikki Linnakangas measured a worst-case slowdown from refetching rows even when every column was replaced, and the discussion left deeper table-access optimizations for later; his concrete ModifyTablePath cleanup was incorporated into the next full submission #26 #30 #31 #32 #33.
Jan - May 2021 · 11 entries
- After another gap, Amit rebased over batch-insert changes, while Robert Haas discussed possible future table-AM interfaces for partial updates; these broader storage changes remained outside the patch #34 #35 #38 #39.
- A newly added postgres_fdw test exposed the stricter restriction on moving rows into foreign partitions that were also UPDATE targets, and Amit adjusted the test accordingly #45.
- Robert Haas's detailed review prompted comment improvements, streamlined junk-column filtering, and renewed prepared-statement benchmarks, which Amit supplied with an updated series #46 #53.
- Tom Lane concluded that constraints and row triggers required reconstructing full rows in ModifyTable for this release, then replaced per-partition targetlists with compact attribute-number lists and executor-built projections #48 #50 #54.
- Tom's review also exposed failures with multiple foreign partitions and fragile fake-parent attributes; he investigated cross-partition postgres_fdw updates but decided their existing correctness problems should not block the main change #54 #55.
- Tom's final posted series introduced ROWID_VAR and RowIdentityVarInfo, translated row identities during append-relation adjustment, changed the FDW target-registration API, restored tableoid lookup with caching, and reinstated regression tests that now documented unsupported foreign-partition movement #60.
- Final benchmarks found some platform-dependent slowdowns for simple partitioned updates but substantial gains for partitioned lookup updates, especially generic plans using runtime pruning; further projection and initialization optimizations were left for follow-up work #61 #63 #65 #68.
- Tom combined both patches from #60 into 86dc90056d, adding documentation and formatting changes and inlining ExecGetJunkAttribute before announcing the commit #69.
- After landing, Robert questioned the choice of tableoid over explicit subplan indexes, and Tom defended its negligible cached lookup cost and clearer EXPLAIN output; Robert accepted that explanation #70 #71 #72.
- Discussion continued about executor startup and partition locking, and Amit corrected a benchmark-script mistake while showing additional gains from separate lazy-initialization work; locking races remained unresolved #73 #74 #75.
- Zhijie Hou later reported inconsistent RowIdentityVarInfo terminology, and Amit posted a small comment correction that Zhijie accepted; the main implementation had landed, but the thread ends without confirmation that this cleanup was committed #76 #77 #78.