model-writtenrun 70 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andrey Borodin proposed compressing large WAL record bodies together to exploit similarities between full-page images and eventually support compression history across records; the initial prototype replaced FPI compression and used expandable buffers prepared before critical sections #1.
- Kirill Reshke reported initialization failure without zstd and a pg_waldump crash #2, after which Andrey posted fixes and reported passing tests plus reduced WAL volume for lz4 and zstd #4.
- Japin Li questioned the parameter documentation and the arbitrary 512-byte threshold #5, while Fujii Masao raised the cost of two record-sized buffers per backend #6; Andrey accepted the need for a memory limit and identified streaming compression as a future direction #7.
- After a long gap, Andrey rebased the prototype and defended allowing thresholds above a WAL block's size #9, then returned with another refresh that corrected compression-buffer memory-context ownership #10.
- Fujii reported a compiler warning and pglz decoding failure and proposed preserving existing FPI-only behavior #11; Andrey accepted that design #12 and implemented whole-record compression with per-FPI fallback and configurable shared workspaces #13.
- Zsolt Parragi identified assign-hook ordering, compressor destination bounds, header padding, and test portability problems in the new implementation #14.
- Andrey returned with a three-part series that isolated zstd compression-context reuse, retained whole-record compression, and added experimental streams; it also removed the buffer-size setting, restricted whole-record compression to lz4 and zstd, and addressed the earlier buffer and reader problems #16.
- The next substantial revision added decompression-context reuse and made streaming readers reconstruct history from fixed 4MB boundaries, with writer retries enforcing those boundaries; reader memory, extra WAL retention, and rewind overhead remained explicit costs #17.
- Following Japin's review of casts and array allocation #18, Andrey refreshed the series, tightened record-length validation, and fixed compression-slot attachment under EXEC_BACKEND #20.
- Anthonin Bonnefoy profiled compression-context reuse and confirmed a visible improvement while questioning the claimed memory footprint #22; subsequent measurements distinguished roughly 152kB for FPI compression from the larger worst-case context estimate #23 #24.
- Michael Paquier selected context reuse for independent progress, requested separate insertion and replay patches, and required backend memory-context cleanup for reader-owned zstd allocations #25; Andrey supplied that split with the requested safeguards #26.
- Michael revised the replay patch to avoid exposing zstd headers through xlogreader.h and reported measurable replay gains #27, while Andrey supplied a benchmark script and accepted the guarded void-pointer representation #28.
- Michael committed the replay revision from #27 without code changes as ce3387b74b and reported consistently positive, though smaller, benchmark gains #29.
- Andrey then restored the three remaining patches, reinstated uncompressed fallback when compressor-context allocation fails, reused the committed reader context for whole records, and improved decompression validation and streaming cleanup #30.
- The discrepancy in replay benchmark gains remained unexplained, with Andrey suggesting that repeated CPU feature detection inside zstd might be especially costly on his virtualized host #32.
- Zsolt found that whole-record compression could enlarge incompressible records and that WAL statistics obscured physical sizes or showed image bytes exceeding total WAL bytes #33.
- Michael committed the insertion-context component of #30 with comment edits as 857340b026, reporting about a 6% improvement in his VACUUM FULL workload #34.
- Andrey's remaining series added a compression-savings check, reduced workspace allocation for FPI-only settings following Nikolay Samokhvalov's off-list review, exposed physical sizes through pg_waldump and a separate pg_walinspect patch, and corrected streaming to retain one compressor per writer #35.
- At the thread's end, both context-reuse optimizations had landed, while whole-record compression, physical-size reporting, and experimental streams remained under review; Zsolt raised unresolved questions about headers crossing pages, compression-flag handling, and repeated attempts to compress incompressible FPIs #36.