model-writtenrun 2050 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Nikhil Kumar Veldanda proposed Zstd TOAST compression with optional trained dictionaries, type-specific sampling, a new dictionary catalog and extended compression headers, initially retaining dictionaries indefinitely #1.
- Kirill Reshke suggested considering an extension API and splitting the large patch, specifically identifying the unsupported-compression error macro as an independent preliminary change #2.
- Yura Sokolov advocated dictionary support usable by multiple algorithms and clarified that Zstd's fastest compression levels are negative, while Aleksander Alekseev pointed to earlier work advocating automatic dictionary generation during VACUUM #3 #7 #4.
- Robert Haas requested evidence that dictionaries justified their complexity, and Nikhil reported a dataset occupying 114 MB with dictionaries versus 210 MB with plain Zstd, 259 MB with pglz and 297 MB with LZ4 #9 #11.
- Tom Lane and Aleksander urged Nikhil to account for earlier TOAST discussions; Nikhil then revised the design to preserve the existing external pointer and keep the algorithm and dictionary identifiers in the compressed datum's extended header #10 #13 #15 #16.
- Robert identified dictionary lifetime as a central obstacle because compressed values can migrate into unrelated tables and container values, making safe dictionary deletion difficult and requiring preservation across upgrades #17.
- Nikhil responded with a seven-patch series that propagated dictionary dependencies through pg_depend, added dictionary generation and cleanup during VACUUM, and taught pg_dump and pg_upgrade to preserve dictionaries #18.
- Robert challenged dependency proliferation, concurrent catalog updates and untracked migration through procedural variables, while Andres Freund agreed that accumulating undeletable dictionaries would be unacceptable for workloads such as tenant turnover #19 #23.
- Nikhil supplied an experimental recursive-decompression delta to prevent compressed values escaping through nested containers, reporting a CTAS slowdown from roughly four to twenty-four seconds; Robert warned especially about imposing overhead on users who did not use dictionaries #21 #24 #25.
- Michael Paquier advocated first making compression headers extensible and adding plain Zstd, leaving dictionary lifecycle and caching questions for later; Nikhil followed with a two-patch series containing an extensible header and dictionary-free compression #20 #26 #27.
- Robert objected to spending three bytes per datum on a generic metadata length, and Nikita Malakhov also questioned the header overhead; Nikhil replaced that field with a one-byte algorithm identifier and metadata-size callbacks #28 #30 #31 #32.
- Robert then questioned the need for any generic metadata interface, prompting Nikhil to remove the callbacks and let each compression method interpret its own payload #33 #36.
- Michael pressed for clearer integration with varattrib_4b and reported successful check-world and preliminary upgrade testing of the union extension; Nikhil subsequently added an optional external-pointer byte and an inline union member encoding the algorithm and a metadata flag #34 #38 #39 #40.
- Michael recommended deferring configurable compression levels and unused metadata abstractions, improving format documentation, and splitting compression tests by method; Nikhil removed those abstractions and introduced pg_compression_available alongside separate LZ4 and Zstd tests #41 #42.
- Michael supported landing the preparatory test work independently but found duplicated cases in the proposed split, recommending that tests involving two compression methods remain in the LZ4 suite while core pglz tests stay minimal #43.
- The first landing, 1dbe6f7667, extracted the unsupported-compression error refactoring from #42, renamed the macro and credited Kirill's earlier review #2.
- Michael posted two extracted patches that revised the availability function and cleaned up the test split, including separate schemas, reduced duplication and suppression of build-dependent error hints; Nikhil said both looked good #44 #45.
- Michael committed the test portion as 74a3fc36f3, replacing the proposed availability function with a query of pg_settings and making small test cleanups; his closing report also noted improved coverage of incompressible LZ4 data #44 #46.
- At the thread's close, the error refactoring and regression-test split had landed, while the new availability function was unnecessary and omitted; extended TOAST formats and plain Zstd remained uncommitted, with dictionary support deferred after unresolved lifetime, leakage and performance concerns #19 #24 #43 #46.