model-writtenrun 9877 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jun - Nov 2018 ยท 23 entries
- David Rowley opened the thread with #1, targeting executor startup and cleanup overhead for INSERT and UPDATE on tables with many partitions, while keeping an explicitly experimental locking-removal patch separate from the proposed optimization.
- Early testing exposed a crash that David attributed to potentially stale build objects in #4, while Jesper Pedersen reported faster INSERT and UPDATE workloads in #5 and Kato, Sho later isolated the original patch's benchmark results in #13.
- Amit Langote proposed abandoning eager traversal of the entire partition tree and supplied a substantial delta in #10 that constructs partition dispatch and result-relation objects only as tuples encounter them.
- David found incorrect UPDATE result-relation matching and an unjustified partition-count limit in #11; Amit revised the lookup in #12, and David consolidated the work in #15 with array-sizing fixes and an OID hash table replacing repeated scans.
- Tom Lane explained why doubling allocations remains protected by palloc's size limit in #16, and subsequent review produced conversion-call cleanup and a flexible-array representation for dispatch indexes in #18 and #19.
- Amit supplied a separate child-to-parent conversion-map refactoring in #20; David initially deferred it in #21, but Amit argued in #23 that eliminating redundant map allocations belonged in the same optimization.
- David merged the map refactoring in #24, fixing a newly exposed ON CONFLICT transition-capture crash and adding a regression test; Amit checked the changes in #25, followed by a comment-only revision in #26.
- After the August review phase, David refreshed the patch against master in #28 and adapted it to upstream tuple-slot changes in #29.
- Krzysztof Nienartowicz described severe PostgreSQL 10 partitioned-insert overhead in #32, but Amit explained in #39 that this work targeted PostgreSQL 12 and that backporting the intervening routing redesigns was unsuitable.
- Robert Haas challenged the conversion-map macro names in #41, leading to shorter names in #42 and a further spelling adjustment requested by Amit in #43 and implemented in #44.
- The naming discussion prompted Amit's broader interface proposal in #46: return routing objects directly and hide PartitionTupleRouting internals; David initially retained the existing interface in #47 while suggesting a dedicated structure attached to ResultRelInfo.
- Jesper's benchmarks in #49 showed that eager partition locking still dominated runtime, reinforcing the distinction between removing routing overhead and the larger gains possible from delayed locking.
- David implemented the new PartitionRoutingInfo design in #50, replacing three parallel arrays, returning ResultRelInfo directly, naming conversions relative to the root table, and validating reused result relations inside ExecFindPartition.
- Amit supported keeping source-tuple conversion state in ModifyTableState in #52, and David moved the root tuple slot there and made PartitionTupleRouting private in #53.
- David revived the experimental locking patch in #55, then included it with a proposed commit message in #57 after reporting encouraging discussion elsewhere; the main patch also adopted Amit's opaque typedef suggestion.
- Alvaro Herrera first extracted the unchanged ON CONFLICT transition-table regression test from #57 as 9079fe60b2, crediting David as author and Amit as reviewer.
- David's remaining series in #60 omitted the committed test, addressed Amit's comments, separated dispatch-array resizing, and avoided allocating dispatch tuple slots when no conversion was needed.
- Alvaro's review uncovered a broken subplan hash-table layout and excessive dispatch-pointer allocation; his fix-up in #66 also consolidated array management and added interrupt checking.
- Alvaro then standardized allocation-context handling and merged routing-info initialization with array registration in #69, rebasing the complete main patch across concurrent tuple-slot changes.
- Alvaro's final benchmark in #70 confirmed that the main optimization removed secondary bottlenecks while locking remained dominant, and he landed #69 as 3f2393edef with only naming, argument-order, and comment edits afterward.
- David requested clearer spacing in the PartitionDispatchData comment in #72, and Alvaro implemented that discussion-only cleanup as ee07e38c14, confirming it in #73.
- Amit supplied an ExecFindPartition comment typo fix in #75, which Michael Paquier committed unchanged as 25c026c284 and acknowledged in #76.
- The routing optimization, regression test, and comment fixes were complete, while delayed partition locking remained separate work: Alvaro requested a new CommitFest entry in #71, and David confirmed its January registration in the thread's last message, #77.