model-writtenrun 8244 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andres Freund proposed batching pg_attribute and dependency insertions after profiling showed substantial catalog insertion costs, while identifying broader dependency collection as a possible further optimization #1.
- Daniel Gustafsson supplied an initial implementation using a catalog multi-insert helper and batched attribute and dependency insertion, reporting passing tests and preliminary profiling improvements #2.
- Following discussions at PGCon, Daniel expanded the patch to collect dependencies through ObjectAddresses and cover more catalog creation paths, while leaving the complexity-versus-performance tradeoff open #6.
- Thomas Munro reported logical-decoding test failures and later a compilation failure; Daniel added an assertion adjustment and adapted the patch to intervening StorePartitionKey changes #8 #9 #10 #11.
- Michael Paquier questioned repeated single-dependency shortcuts and found further decoding failures; Daniel added a decoding early return, extension dependency collection and expected-output changes reflecting dependency deduplication #12 #14 #15.
- Andres's detailed review called for bounded reusable slots, direct virtual-tuple construction, caller-owned slot cleanup and simpler dependency handling, which Daniel incorporated in a substantial rewrite #16 #20.
- Michael then found unresolved catalog command-ID decoding failures and requested consolidation of the single-attribute and multiple-attribute insertion functions; the unexplained failure stalled the patch into January #21 #22 #23.
- After discussing the problem with Andres at FOSDEM, Daniel isolated the missing first-tuple CID record and posted an independent prerequisite fix #24 #25.
- Michael committed that prerequisite with an explanatory comment as 7d672b76bf, without backpatching because catalog multi-inserts did not yet exercise the bug #26.
- Daniel resumed the main work by consolidating attribute insertion and then extracting the remaining DecodeMultiInsert fix into a separate patch #27 #30.
- Michael reviewed the decoding fast path for consistency with DecodeInsert and committed it with comment refinements as 12c5cad76f #31 #32.
- Further review led Daniel to use add_exact_object_address, restore attribute statistics initialization, construct pg_shdepend virtual tuples and remove an unnecessary memory-context switch #32 #33.
- After a gap, Daniel rebased the patch for operator-class parameters, and Michael took over revision work, removing duplicated dependency insertion code and a fragile fixed-size pg_type dependency array #34 #35.
- Michael reported landing the independent pg_type cleanup and split the remaining work into ObjectAddress cleanup, extension dependency grouping and catalog batching, deferring mixed-dependency collection and bounding pg_depend batches #37.
- Daniel tested the three-part series successfully; Michael then committed extension dependency grouping with an added comment as 684b4f29b7 and expanded ObjectAddress cleanup as 4315e8c23b, resending the remaining batching patch #38 #39.
- Michael measured WAL reductions for wide-table creation and database-template copying, but found that pg_depend batching allocated many slots for pinned dependencies that would never be inserted #40.
- Daniel agreed to defer pg_depend for separate work, and Michael posted the polished pg_attribute and pg_shdepend patch with 64kB batch limits #41 #42.
- Daniel agreed to close the existing commitfest entry and pursue pg_depend separately, and Michael landed the final patch unchanged apart from whitespace as e3931d01f3 #43 #44.
- Immediately after landing, Michael discovered excessive slot-initialization overhead during CREATE DATABASE with few template dependencies and posted a fix that creates slots only when needed #44.
- Daniel acknowledged the follow-up fix, which subsequently landed with minor formatting and comment edits as 022350b849 #45.
- The thread ended with Andres welcoming the result; pg_attribute and pg_shdepend batching had landed, the slot fix was awaiting its subsequent commit, and pg_depend batching and broader mixed-dependency collection remained deferred #46 #43 #38.