model-writtenrun 9267 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Mar 2018 · 1 entry
- Andrey Borodin opened the thread with empty-leaf recycling to reduce GiST bloat and physical-order scanning to improve VACUUM I/O; the initial design retained logical scanning when its full parent graph exceeded the memory budget and deliberately preserved each internal page's last child #1.
May 2018 · 1 entry
- Thomas Munro identified a Windows portability problem in the physical scanner's flags type, and Andrey corrected it #2 #3.
Jul - Aug 2018 · 7 entries
- Heikki Linnakangas found insertion races, questioned deletion-XID storage, and required parent-downlink removal and leaf deletion to share one WAL record so crashes could not leak pages; Andrey revised the implementation accordingly #4 #7 #9.
- Heikki demonstrated that concurrent splits could move dead tuples behind a physical scan, producing incorrect results if those tuples survived VACUUM; Andrey added starting-LSN and page-NSN checks with backward rescanning #13 #15 #16.
- After experiments with special-space storage, Robert Haas argued for reusing pd_prune_xid, and Andrey restored that storage behind accessors before correcting a deletion-WAL downlink-offset bug found during replay testing #17 #18 #19.
- Heikki rejected the extra maintenance_work_mem-sized parent graph and requested physical scanning first, followed by page deletion; Andrey replaced the graph and logical fallback with a physical scanner and two bitmaps supporting a second pass over internal pages #20 #21 #23.
- Heikki then refactored the scanner along B-tree lines, removed unnecessary lock retention and duplicate cleanup scanning, and ensured VACUUM also visits pages added during concurrent index extension #26.
- Andrey supplied instrumentation and scripts to trigger NSN and FOLLOW_RIGHT backward jumps, fixed starting-NSN acquisition during cleanup, and restored the deletion patch on top of the revised scanner #28 #29.
- Thomas diagnosed a declaration error and bitmap crash, while Heikki's memory review led Andrey through a list-and-Bitmapset implementation to two preallocated Bitmapsets with early termination of deletion scanning #30 #31 #32 #33 #34 #36.
Oct 2018 - Apr 2019 · 11 entries
- After the autumn rebase and review gap, Heikki fixed NSN initialization for temporary and unlogged indexes and highlighted Bitmapset's signed-integer limit; Andrey submitted further test variants and a radix-tree alternative for block-number sets #38 #40 #41 #42 #43.
- Heikki repaired test instrumentation that had corrupted indexes, exercised both backward-rescan cases, and checked index results with additional validation; Andrey reproduced those tests #46 #47.
- The physical-scan component of Andrey's latest series #42 landed as fe280694d0, with final comment editing and restoration of the old-index invalid-tuple check, leaving page deletion under development #48.
- Andrey returned with the deletion remainder, a separately tested BlockSet library, and revised child-before-parent locking; Heikki found a crash and supplied cleanup patches, after which Andrey changed deletion to lock only one leaf-parent pair at a time #49 #50 #51.
- Jeff Janes reported large physical-scan speedups and successful concurrent crash-recovery testing, but his report followed that feature's commit and therefore supplies post-commit validation rather than pre-commit review #52 fe280694d0.
- Heikki replaced BlockSet with IntegerSet from a separate discussion, consolidated the cleanup patches, and moved deletion into the cleanup stage, while identifying missing hot-standby protection for reused pages #53 #54.
- Heikki added B-tree-style page-reuse WAL and standby conflict handling, then removed a bogus NSN condition that had prevented many empty pages from being deleted; broader reuse-WAL generalization and a page-format-based deleteNSN mechanism were left for future work #56 #57.
- The deletion patch #56 landed as 7df159a620 with IntegerSet API adaptations, a dedicated memory context, and editorial changes; internal pages and each internal page's last child remained undeletable, so some long-term growth remained possible #59.
- Immediately after that landing, Heikki reported buildfarm failures reproducible by running VACUUM alongside regression tests and began investigating; this thread contains no corresponding fix patch or explicit resolution of that incident #60.
- Andrey then noticed that transaction-ID wraparound could make an old deleted page unrecyclable for half a cycle, and Heikki proposed storing the full XID and epoch instead of resetting the field and dirtying the page #62 #63.
- Heikki posted a two-patch follow-up that refactored deleted-page checks and moved a 64-bit deletion XID into otherwise-empty page contents; Andrey questioned standby safety and identified a reversed age comparison #64 #65.
Jun - Jul 2019 · 5 entries
- After a review gap, Heikki revised the fix to log full XIDs and perform wraparound checks during standby redo, eliminating a race in the primary-side check, and introduced an explicit deleted-page contents structure #71.
- Andrey's stress tests and check-world passed for the revised pair, and Heikki explained why serial WAL replay prevents the suspected redo race #73 #74.
- Thomas Munro warned that a general XID-to-full-XID helper would invite unsafe reuse, while Amit Kapila described other potential callers; Heikki narrowed the API to GetFullRecentGlobalXmin(), combined deletion marking with XID storage, added compatibility for earlier beta pages, and tested wraparound #75 #77 #78.
- The two final patches from #78 landed separately as 9eb5607e69 and 6655a7299d, with only comment corrections, and Heikki confirmed their application to master and PostgreSQL 12 #79.
- The thread ended with the GiST work committed and discussion turning to an analogous B-tree wraparound fix; Peter Geoghegan and Heikki had not settled whether that future fix should target only master or older branches #80 #81 #82.