model-writtenrun 7577 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Dec 2020 - Apr 2021 ยท 29 entries
- Masahiko Sawada opened the thread with an amvacuumstrategy API that let individual indexes request or decline bulk deletion while heap vacuuming coordinated safe TID reuse, with INDEX_CLEANUP providing an explicit override #1.
- Peter Geoghegan explored how that API could complement bottom-up index deletion, adding a benchmark-specific patch and heap LP_DEAD limits; his tests showed reduced reads while keeping the heap and several indexes from growing #4 #5.
- Sawada incorporated that experiment into a three-patch series with fillfactor-based limits, a larger MaxHeapTuplesPerPage, and btree metapage size tracking, then added retained strategy answers and corrected a missing attachment #10 #11 #12.
- Zhihong Yu and Peter reviewed the API, memory limits, documentation, and metapage handling; Peter also identified bitmap-size consequences of increasing MaxHeapTuplesPerPage and benchmark evidence that requiring absolutely no index growth was too conservative #13 #14 #15 #19.
- Sawada merged the API and integration patches, added an initial aggressive anti-wraparound prototype, and corrected parallel-vacuum and btree sentinel bugs #20 #22.
- Peter proposed cutting PostgreSQL 14 scope to avoiding index scans when a table has practically no dead tuples, then refined the criterion to count affected heap pages so that visibility-map coverage would remain predictable; Sawada agreed to defer per-index strategies and larger line-pointer arrays #26 #27 #30.
- Sawada raised the risk of worsening btree deleted-page recycling leaks, and Peter undertook that issue separately so it would not block the reduced vacuum optimization #30 #31 #32.
- Sawada posted the smaller vacuumlazy.c implementation using a 1% affected-page threshold and discovered that existing LP_DEAD items were not setting the page's dead-item flag #34.
- Review then focused on keeping page counts valid across the whole VACUUM and avoiding repeated index scans when maintenance_work_mem ran out, while Robert Haas reinforced concerns about the deferred large line-pointer arrays #38 #40 #49.
- Peter first committed the isolated dead-item flag correction from #34 as 0ea71c93a0, then posted a much larger revision that removed tupgone machinery and made index vacuuming dynamically optional #51.
- Andres Freund challenged the safety of simply dropping the newly dead tuple case and proposed retrying pruning instead; Peter adopted that approach and separated the infrastructure from the bypass optimization #52 #55 #63.
- Sawada revived emergency skipping as an autovacuum age check, then supplied a patch over Peter's revised series that deferred the decision until index vacuuming was about to run #62 #64 #65.
- Peter argued for repeatedly checking actual wraparound danger rather than treating every anti-wraparound vacuum as an emergency, while Robert argued that the threshold should be configurable and that emergency handling should also disable cost delay #68 #69.
- The infrastructure was split into refactoring, tupgone removal, and optimization patches; separate pruning and heap-vacuum WAL records made heap vacuuming a simpler operation requiring only an ordinary exclusive buffer lock #71.
- Sawada found duplicate counting and reviewed the proposed AUTO semantics, leading to corrected refactoring and a four-patch series that incorporated emergency XID and multixact GUCs while dropping the AUTO option for this iteration #74 #83 #85 #87.
- Peter centralized per-VACUUM state, clarified parallel index-statistics ownership, merged the two skipping features, and implemented cost-delay removal during failsafe operation; optimization-driven skipping continued to permit index cleanup #88.
- Further revisions added autovacuum logging, integer counters, and consistency assertions for dead items and visibility state #89 #90.
- Robert and Sawada's detailed reviews prompted Peter to remove function-order churn and unnecessary scan helpers, retaining lazy_scan_prune() while simplifying one-pass vacuum and extending failsafe behavior to tables without indexes #91 #92 #98.
- Peter also imported Matthias van de Meent's line-pointer truncation work from thread #43824, adapting it to VACUUM's second heap pass rather than opportunistic pruning so that reclaimed line-pointer space would not accumulate indefinitely #98.
- The state-centralization component of #98 landed as b4af70cb21, incorporating Sawada's proposed parallel-statistics rewrite and restored assertions #99 #101.
- That landing exposed parallel workers' missing buffer-access strategy initialization; Tom Lane and Andres clarified the process-state issue, Peter repaired worker initialization, and Amit Kapila opened a separate thread for PostgreSQL 13 #102 #104 #105 #107 #113.
- Matthias identified an unsafe HOT-chain offset assertion and questioned truncation coverage and pruning statistics; Peter accepted the offset correction but deferred pruning-time truncation and retained the simple retry accounting #100 #109 #110.
- The scan-loop refactor and tupgone removal from #98 landed as 7ab96cf6b3 and 8523492d4e, with local scan-loop changes, revised reporting, comment cleanup, and the WAL version bump.
- Peter resent the two remaining patches, and Sawada supplied a final delta that simplified logging and checked failsafe status before enabling parallel vacuum #111 #112.
- Line-pointer truncation landed from #111 as 3c3b8a4b26 with light edits; Peter explicitly deferred expanding truncation to additional pruning cases because the release deadline had arrived #114.
- The combined final feature patch was split into wraparound failsafe and unnecessary-index-vacuum bypass commits, incorporating the applicable portions of #112 as 1e55e7d175 and 5100010ee4; Peter lowered the failsafe defaults to 1.6 billion and announced that the series had landed #115.
- Sawada subsequently noticed that failsafe mode still attempted heap truncation before advancing relfrozenxid, prompting the discussion-derived guard in 60f1f09ff4 #117 #118.
- Andres and Robert objected to the speed and limited review of the post-freeze behavioral changes, and Andres raised concerns about inadequate failsafe tests, abrupt removal of cost throttling, and prolonged index-cleanup suppression; Peter acknowledged the communication failure while defending the emergency policy #120 #122 #123 #125 #126.
- At the thread's end the reduced series and follow-up remained committed, with no revert recorded; the original per-index API and broader pruning-time truncation remained deferred, while disagreement continued over failsafe behavior and headroom for installations using high autovacuum_freeze_max_age settings #127 #129 #130.