model-writtenrun 9561 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Oct 2018 - Apr 2019 ยท 16 entries
- David Rowley proposed replacing MergeAppend with ordinary Append when range-partition order already supplies the requested ordering, demonstrating faster scans over a large partitioned table in #1; Amit Langote connected the proposal to earlier work by Ronan Dunklau and Julien Rouhaud in #2.
- Julien Rouhaud found that the first patch could emit unsorted rows from children lacking suitable indexes in #5, prompting David to add child Sort construction and costing, support subpartitions, and recognize single-value list partitions in #6.
- David added redundant-pathkey filtering in #10, after which Antonin Houska identified incomplete-pathkey hazards and opportunities where the requested ordering extends the partition keys in #11 and #13; the revisions through #15 added safe prefix handling and regression tests.
- Julien's review of #15 prompted the function name generate_orderedappend_paths() in #17, making its ability to generate either Append or MergeAppend explicit.
- Julien advocated caching natural partition ordering to support more list-partition cases efficiently in #18 and #24; David eventually accepted the rationale in #25, but broader list support and pruning-aware checks remained deferred to avoid expanding the patch's scope and dependencies.
- After the December review, David maintained the patch through January and February rebases in #27 and #29, and Antonin confirmed that his earlier concerns were addressed in #30.
- Tom Lane questioned the complexity of supporting children requiring Sort nodes and identified missing boolean-key handling in #34; David retained Sort support while adding boolean restriction recognition and explaining the pathkey rules in #38.
- Julien and Robert Haas defended retaining ordered Appends with some sorted children in #35 and #40, emphasizing avoided work under LIMIT and benefits when only some partitions have suitable indexes.
- Tom explained that expensive later child startups create cost discontinuities that the planner cannot model in #43 and #48, potentially causing a wrongly favored merge join rather than merely choosing between Append and MergeAppend.
- Tom proposed pessimistic startup costing in #52 and explained why it also protects against expensive already-ordered children in #57; David implemented the sum of all child startup costs in #60, preserving Sort support.
- Julien demonstrated additional missed optimizations in mixed list/range partition hierarchies in #58; David explained that exploiting partition constraints through equivalence classes would require broader work and deferred it beyond the approaching release cutoff in #59.
- David rebased over upstream single-child Append suppression in #62, and Julien's detailed review in #63 led to clearer comments, formatting, and an ordering assertion in #64.
- Amit Langote questioned the placement of planner helpers in partprune.c and examined NULL ordering in #65 and #66; David moved the helpers into pathkeys.c and partbounds.c in #70, while Amit's subsequent testing confirmed the ordering behavior in #72.
- Amit's remaining review refined the definition of ordered partitions and declaration style, producing the final attachment in #77; David marked the work ready for a committer in #79, and Julien confirmed his review in #80.
- Tom committed 959d00e9db from #77 with cleanup and local corrections, including executor propagation of tuple limits through Append so underlying Sort nodes can use the bound, as explained in #81.
- The thread ended with the feature landed for PostgreSQL 12 and acknowledgments in #82, #83, and #84; pruning-aware ordering, broader list-partition support, and further hierarchy optimizations remained future work.