model-writtenrun 4451 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Mar 2023 ยท 22 entries
- Melanie Plageman proposed pg_get_wal_records_extended_info() to expose block-reference fields as SQL columns alongside record metadata, making queries such as relation-name lookups easier #1.
- Michael Paquier proposed expanding and renaming the existing FPI function instead of adding another function, exposing block data, image lengths, and image flags while using the record LSN to join back to record information #3; Matthias van de Meent advocated a single structured decoding interface to avoid repeated scans, while Kyotaro Horiguchi supported the block-oriented function #5 #7 #9.
- Michael supplied the rewritten block-information function #10, and Bharath Rupireddy added tests, documentation corrections, and tighter memory cleanup #12; Michael then retained replica-level WAL tests and rejected both per-record context creation inside the helper and the synthetic WAL_VERIFICATION flag #14.
- Bharath tried explicit frees after each block #17, but Michael, Kyotaro, and Bharath ultimately preferred the simpler earlier version because the existing per-record context reset bounded memory use #19 #20 #21.
- Michael committed the implementation from #14 as 9ecb134a93, changing only a documentation example, and announced the landing in #23.
- Melanie's subsequent testing found that joining block and record information took about 1191 ms versus 467 ms for a combined function, reopening the decision to omit record-level columns; her initial FPI-decompression experiment showed relatively little benefit from skipping images #26.
- Peter Geoghegan argued that common block-history queries should not require parsing block_ref or joining two function results #29, and Bharath supplied a follow-up that added record-level columns directly to pg_get_wal_block_info() while preserving the record-oriented function #30.
- Michael suggested a LATERAL join and keeping the narrower interface #31 #32, but Bharath measured roughly 50 seconds for that approach, 10 seconds for a conventional join, and 3.3 seconds for the combined function over his large test workload #33.
- Peter supported the combined interface and requested NULL instead of an empty block_ref for records without blocks #36; Michael agreed with that NULL behavior while raising concerns about FPI materialization and disk spills during large scans #39.
- Bharath split the work into a preparatory optimization and the record-column enhancement, adding an early skip for blockless records and NULL block-reference output #42.
- Kyotaro found incorrect array-reset sizing and recommended independent tuple builders instead of sharing and overwriting parts of the record output #43; Peter supported that change and requested clearer documentation, assertions, column ordering, and NULL descriptions #44 #45 #46.
- Melanie measured additional I/O costs from returning FPIs and revived the proposal for an output-control argument #49, which Peter supported while Michael explained why access to raw FPIs through SQL still mattered #52 #54.
- Bharath rewrote the enhancement with separate tuple construction and expanded documentation #56, then restored LSN-first column ordering and reduced unnecessary code movement following Michael's and Kyotaro's feedback #57 #58 #59.
- Michael committed only the optimization component of #59 as 0276ae42dd, consolidating block-reference extraction while applying it #60; Bharath resent the remaining record-column enhancement #61.
- Peter took over preparation for the main enhancement, proposing numeric fork identifiers and revised column grouping #63, but also discovered that the optimization commit now emitted FPI length before calculating it, yielding zero #64.
- Peter and Bharath independently posted revisions labeled v7: Peter reorganized the output and FPI metadata #65, while Bharath supplied a separate FPI-length fix plus his own enhancement revision #66; Peter later clarified the simultaneous submissions #68.
- Peter committed the FPI-length fix from #66 unchanged as bade01cb4d, restoring calculation before output and leaving the enhancement for a separate landing #68.
- Michael argued for readable textual fork names #69, while Peter retained numeric fork identifiers for consistency with pg_buffercache and added block_data_length plus the block_fpi_data name in his continuing branch #70 #71.
- Peter reorganized the documentation to explain the record-oriented and block-oriented functions together and clarify future end_lsn values #72, and Bharath reviewed that version positively #73.
- Peter committed #72 as 122376f028, with final naming, localized implementation cleanup, and documentation edits, then announced the landing #74.
- Peter's separate suppression patch preserved length metadata while optionally returning NULL for both bytea columns; his approximately 12 GB WAL workload improved from about 35 seconds to 15 seconds, making the case for this remaining optimization #74 #75.
- The suppression patch landed as df4f3ab517, with the option inverted and renamed to show_data DEFAULT true and documentation added; Peter's final message confirms the landing and closes the thread with all submitted feature work resolved #76.