model-writtenrun 9478 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Aug - Dec 2018 · 9 entries
- Amit Langote opened the thread with #1, proposing to make planning scale with surviving partitions by restructuring UPDATE/DELETE planning, delaying partition objects until after pruning, and eventually locking only selected partitions.
- Profiling prompted by Takayuki Tsunakawa's questions exposed partition-bound copying and loops over every partition, leading Amit to introduce live_parts iteration and related savings in #7.
- David Rowley argued that canonical partition order could support delayed locking in #13, while Amit examined compatibility with DDL locking in #14.
- David's detailed review in #15 identified lock-mode, constraint-exclusion, and equivalence-class concerns; Amit broadened the proposal to all inheritance and temporarily removed inheritance_planner in #19.
- After a pause and further review, Amit returned with #30, unifying inheritance expansion but restoring a redesigned inheritance_planner that ran query planning once before processing individual targets.
- Alvaro Herrera requested separation of code movement from functional changes in #33, producing the reorganized series in #37.
- Imai's translation delta in #32 and memory measurements in #40 exposed repeated work and duplicate query copying, which Amit addressed with child-private planner state and a separate expansion phase in #41.
- David supplied equivalence-class diagnostics in #39, and Amit's subsequent #45 replaced target-parent members within child-private equivalence classes, improving UPDATE joins even without pruning.
- Further review and Imai's cleanup delta in #49 led to the revised helper organization in #51, which Justin Pryzby tested against a large customer schema in #52.
Jan - Feb 2019 · 9 entries
- Amit moved the independent file reorganization to the front of #63, and Alvaro committed it as b60c397599 with include and formatting cleanup.
- David's post-landing module-boundary review in #66 prompted Amit's fixups in #68 and #71; their latest submission in #76 became d723f56872, with additional function ordering.
- David challenged shallow equivalence-class copying in #74, and Amit fixed shared mutable state and missing multilevel merge-join opportunities in #76 before reducing and rebasing the remaining series in #78.
- During the next review round, David supplied an all-targets-pruned crash fix in #97, which Amit incorporated into #101.
- David then extracted reusable child-qualification building in #108; Alvaro committed it with comment edits as 80579f9bb1, and Amit adapted the main series in #113.
- Tsunakawa's independent LOCALLOCK-list experiment in #114 addressed lock-table scanning overhead, and that work moved to separate discussion as recorded in #117 and #118.
- Successive reviews corrected equivalence-class translation and split cleanups through #129, but Tom Lane found a fundamental parameterized-path failure in #138 and rejected fragile cloning of partially constructed planner state in #140.
- Amit withdrew the original UPDATE/DELETE overhaul in #141 and posted the narrower #142, preserving existing target planning while delaying source inheritance expansion.
- Justin's testing in #143 caught an incorrect relation-kind check, fixed in #144; Imai then found repeated source expansion slowing UPDATEs in #146, prompting source-object reuse in #147.
Mar 2019 · 15 entries
- Amit divided the redesigned implementation into six reviewable changes in #150, covering separate otherrel construction, delayed expansion, source reuse, earlier pruning, live_parts iteration, and avoiding partition-bound copies.
- Jesper Pedersen's and Imai's reviews drove #156, while Imai's delta in #166 helped motivate #167's avoidance of unnecessary target-RTE copying; his measurements in #168 showed a substantial memory reduction.
- Amit separated delayed rowmark junk-column creation in #169, then corrected the postgres_fdw regression reported by Jesper in #170 with #171.
- Imai's incremental benchmarks in #186 and Jesper's profiling in #195 identified remaining scaling costs, leading Amit to postpone unnecessary runtime-pruning map construction in #199.
- Tom extracted the bound-copy and pruning-map optimizations from #199 as c8151e6423 and 734308a220, preserving their approaches with small cleanup edits.
- Tom's review in #202 and #203 challenged jointree traversal, targetlist handling, and inheritance-planner complexity; Amit's #205 adopted baserel-array traversal and direct processed_tlist updates and introduced duplicate partition-parent RTE removal.
- From the rebased #206, Tom committed duplicate-RTE removal as e8d5dd6be7, adding nearby logic simplification and corrected postgres_fdw output.
- Tom also extracted separate otherrel construction from #206 as 53bcf5e3db, moving lateral-reference propagation into build_simple_rel as explained in #209.
- The targetlist discussion produced Tom's additional, unattached cleanup 333ed246c6, replacing aliases and passed parameters with direct use of root->processed_tlist.
- Tom substantially rewrote the remaining series in #221, making inheritance_planner first plan the query as SELECT to identify surviving targets; Amit and Imai demonstrated large UPDATE improvements in #222 and #223.
- Tom found that existing and proposed partitionwise-join handling crashed under GEQO in #227, then posted #228 with a separate fix that avoids modifying base relations during join planning and declines unsupported degenerate outer joins.
- That prerequisite landed as 7ad6498fd5, with regression comments corrected following Amit's #229, and the main planner improvement landed from the same submission as 428b260f87 with a one-line memset-size correction.
- Amit questioned target-index remapping in #224, and Tom defended the need for it in #225; Tom subsequently added the previously unattached updatable-view testcase as 8fba397f0c.
- Imai rebased and benchmarked the omitted live_parts optimization in #237, but Tom considered its benefit small beside other remaining overhead and favored broader improvements in #239.
- Tom proposed comprehensive baserel-only array iteration in #240, but Amit could not demonstrate a useful latency improvement in #243, and Tom declined to pursue it in #245.
Apr - May 2019 · 5 entries
- Amit's post-landing constraint-loading repair in #244 addressed missed exclusion of directly accessed partitions and redundant checks; Tom exposed incorrect treatment of a source partition in UPDATE in #246, leading to #247.
- Floris Van Nee's post-commit experiments in #248 and #254 exposed remaining planning and JIT costs when pruning occurs only at execution; David and Amit explained the limits of this work and deferred broader costing changes in #249, #255, and #256.
- Amit added documentation corrections in #253, and Tom subsequently clarified the separate responsibilities of constraint_exclusion and enable_partition_pruning in #259.
- Tom's revised #263 retained constraint-selection policy in relation_excluded_by_constraints and catalog access in get_relation_constraints, while adding proper handling of inheritable ordinary constraints; its HEAD attachment landed unchanged as e03ff73969.
- Tom announced development and stable-branch fixes in #264, and Amit acknowledged completion in #265; the main improvement and constraint cleanup had landed, while live_parts iteration, broader planner restructuring, and runtime-pruning cost improvements remained outside the completed work.