model-writtenrun 4378 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jan - Apr 2023 ยท 29 entries
- Andres Freund opened the thread with measurements showing that VACUUM's small ring caused expensive repeated WAL flushes, proposing an explicit bypass and automatic bypass during failsafe vacuuming #1.
- Peter Geoghegan suggested tying bypass to INDEX_CLEANUP being disabled, but Andres argued that initial loads and heavily bloated indexes also needed faster vacuuming; Peter accepted keeping the controls separate #5 #6 #7.
- Tom Lane proposed configurable ring sizes instead of only an on/off switch, and Andres developed the BUFFER_USAGE_LIMIT interface while explaining that strategy rings reuse ordinary shared buffers rather than a separate pool #10 #11 #13.
- Melanie Plageman supplied the first implementation, combining failsafe bypass, a buffer-count option, globals cleanup, and a suspected memory-leak fix, while questioning the usability of specifying buffer counts #14.
- Andres Freund and Bharath Rupireddy reviewed the initial code; their feedback led Melanie to drop unnecessary cleanup, preserve the existing constructor API, accept memory-size units, and add a configuration setting, later narrowed to vacuum_buffer_usage_limit #15 #17 #18 #19.
- Justin Pryzby requested user-facing strategy documentation and matching vacuumdb support, while Masahiko Sawada found assertion failures and crashes at large sizes; Melanie fixed overflow and boundary checking and added the requested interfaces and documentation #20 #24 #28.
- Ants Aasma proposed dynamically resizing rings according to WAL-flush pressure, but Melanie treated adaptive sizing as complementary future work that would still need a configurable maximum #21 #33 #34.
- After off-list discussion with Jelte, Melanie changed vacuumdb to forward size strings for server-side validation, then incorporated Justin's documentation feedback, introduced a glossary entry and field rename, and split vacuumdb into a separate component #29 #30 #31.
- David Rowley supplied glossary markup and wording fixes, Melanie corrected their syntax and prose, and David committed the combined result with minor final wording changes as c8f8d0eb18 #35 #36 #37.
- The next series dropped the landed glossary and gave each parallel vacuum worker a strategy ring matching the main worker's size #38.
- David expanded Melanie's globals cleanup to remove both vac_strategy and vac_context; Melanie approved it, and it landed with a small argument-order adjustment as 3f476c9534, while analogous analyze.c cleanup was left out because it would require changing the sampling callback interface #39 #41 #45.
- Melanie added option-combination checks, tests, and an optimization avoiding unused strategy allocation; that optimization landed directly from its series component as 32fbe0239b #44.
- The failsafe component of the same series landed with documentation and comment refinements as 4830f10243, disabling the strategy when avoiding transaction-ID wraparound takes priority #44.
- The ring_size-to-nbuffers component landed unchanged as 8d928e3a9f, leaving only the configurable SQL/GUC feature and vacuumdb option to resend #44 #46 #47.
- David opposed linking INDEX_CLEANUP to strategy bypass, deferred extra per-strategy reuse reporting, and favored retaining an opaque strategy structure with an accessor; Melanie accepted those scope decisions #46 #47.
- David's detailed review prompted constructor consolidation, a GUC validation hook, naming cleanup, and explicit ANALYZE support, but the resulting rejection of values above shared_buffers/8 also made tests configuration-dependent #48 #49.
- David explained that validation must not make reducing shared_buffers break server startup or existing commands, so Melanie restored silent runtime capping while retaining explicit hard size bounds and improving documentation #50 #53.
- Andres proposed allocating interactive VACUUM's strategy in ExecVacuum and deferring live ring resizing; Melanie developed a broader caller-owned setup refactoring, initially encountering an isolation-test deadlock #52 #55 #58.
- While implementing that refactoring, Melanie discovered that the allocation optimization incorrectly omitted the strategy for VACUUM FULL with ANALYZE; David fixed the reported regression as bccd6908ca before Melanie posted her corrected standalone attachment #58 #59.
- Melanie resolved the experimental deadlock by retaining use_own_xacts calculation inside vacuum(), removed the already-landed correction, and restored useful option tests; David also withdrew his concern that the refactoring changed cross-table strategy reuse #59 #61 #62 #63.
- The setup component of #63 landed as b9b125b9c1, with David retaining transaction-block detection in vacuum() and simplifying autovacuum's memory-context plumbing.
- David then reposted the remaining main feature, replacing public -1 defaults with an explicit 256 kB default, permitting FULL with ANALYZE, simplifying size conversion, and fixing NULL strategy counting for parallel vacuum with the strategy disabled #64.
- Melanie caught residual -1 handling and documentation inconsistencies in David's revision; David incorporated those corrections and a zero-limit test, while Justin caught a final README typo #65 #66 #67.
- The SQL/GUC feature landed from #66 as 1cbbee0338, with light final edits adding performance guidance, simplifying equivalent default selection, and testing ANALYZE with a zero limit #68 #69.
- The vacuumdb component last attached in #63 landed as ae78cae3be, with a FULL-plus-ANALYZE exception and corrections from KB to the accepted kB spelling in documentation and error messages #69.
- Peter Eisentraut subsequently found the new documentation confusing about size values, units, and option ordering; David supplied a focused correction and committed it with minor wording changes as c0235013c1 #70 #71 #72.
- Melanie supported consistently using size terminology and asked about broader VACUUM/ANALYZE option ordering, which David moved into a separate thread #73 #74.
- Masahiko Sawada supplied a final sample-configuration correction adding kB and aligning comments; David Rowley, Daniel Gustafsson, and Melanie Plageman reviewed it, and it landed as b72f564d87 #75 #76 #77 #78.
- The final message confirms that the sample-configuration fix was pushed, completing the submitted feature and follow-up fixes; adaptive sizing, live ring resizing, broader strategy configurability, and general option reordering remained deferred or separate work #79 #34 #52 #44 #74.