model-writtenrun 6999 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Dec 2023 - Mar 2024 · 13 entries
- Melanie Plageman opened the thread with preparatory patches that confined vacuum's page-skipping decisions to an iterator, making the heap scan suitable for a future streaming-read callback #1.
- Andres Freund recommended keeping loop-local variables, embedding iterator state in LVRelState, and giving the caller a simple next-block interface; Melanie incorporated those changes and renamed the iterator in the next revision #3 #6.
- Jim Nasby questioned whether explicit skipping ranges would remain useful with vectored I/O, while Melanie deferred removing the heuristic until cross-platform benchmarking could establish its safety #4 #7 #8.
- After a rebase, Melanie expanded the series to include the proposed streaming-read API and consumers for both heap passes #11 #12.
- Heikki Linnakangas took up the preparatory refactor, supplying separate cleanup patches for state ownership, VM-buffer handling, and comments; Melanie tested those changes and folded them into the complete series #13 #15 #16.
- In a parallel revision, Melanie fixed undefined index references reported off-list by Andrey Borodin and published benchmarks showing benefits alongside problematic interactions with the vacuum buffer ring #14.
- Heikki's review uncovered an existing DISABLE_PAGE_SKIPPING bug that could dirty unchanged pages and prevent clearing incorrect visibility-map bits; Peter Geoghegan explained the original intent, and Melanie analyzed the missed correction case #17 #18 #24.
- Heikki attached the visibility-map fix alongside a substantially consolidated iterator refactor, adopting separate VM-buffer pins and correcting the iterator's end-of-relation result #23.
- The visibility-map fix landed unchanged from that attachment as 674e49c73c, and Heikki announced its backpatch while resubmitting the remaining work #30.
- Melanie's measurements showed that both the iterator refactor and removal of its delay point reduced vacuum time, while her review prompted clearer explanations of the iterator's states #26 #27 #30.
- After Melanie reviewed the extracted helper, Heikki committed the refactor with comment edits and equivalent condition reordering as 4e76f984a7, and committed the attached delay-point removal unchanged as 3d8652cd32 #31 #32.
- Melanie resent the remaining streaming consumers and found that the updated API avoided excessive pinning but increased WAL flushes; Thomas Munro traced this to read-ahead consuming space previously available for accumulating dirty buffers #34 #35.
- The performance analysis here helped motivate increasing the default vacuum ring from 256 kB to 2 MB, but 98f320eb2e came from the matching patch in #559246 in thread #49120; Thomas later reported that the increase largely alleviated this thread's WAL-flush problem #28 #35 #41.
Jun - Jul 2024 · 2 entries
- After several months, Melanie posted Thomas's updated series using the landed ReadStream API and a new TidStore prerequisite that allowed iterator results to be queued without copying full offset arrays; broader streaming work remained waiting on write-behind investigations #36 #38 #39.
- Noah Misch approved the TidStore design subject to removing unrelated cosmetic edits, and Thomas committed that lightly modified prerequisite as f6bef362ca before resending the two remaining consumers #40 #41.
Dec 2024 - Feb 2025 · 10 entries
- Tomas Vondra revived the streaming work with benchmarks showing substantial speedups and some regressions; Melanie then corrected first-pass buffer acquisition so a buffer would not stay pinned across expensive maintenance operations #42 #43.
- Tomas's repeated benchmarks no longer showed the large regression and supported proceeding, while discussion of I/O concurrency and combine-limit defaults was left for separate work #44 #45 #47.
- Melanie polished both consumers and adapted them to eager scanning by adding a prerequisite that packs visibility and eager-scan information into per-block flags #48 #49 #50.
- Masahiko Sawada identified allocation-size, FSM-boundary, and failsafe-check issues, Thomas tested and reviewed the series, and Melanie incorporated their feedback through the final attachment #51 #53 #54 #56 #57.
- The final attachment landed without code changes as the flags prerequisite 32acad7d1d, first-phase streaming 9256822608, and third-phase streaming c3e775e608, completing the main streaming-vacuum series #57 #58.
- The new consumers immediately exposed a Valgrind annotation bug: reused per-buffer storage remained marked inaccessible after wipe_mem(), and Thomas supplied a separate fix #59 #60 #61.
- Tom Lane reviewed the Valgrind fix and supported deferring its stable-branch application until after the imminent release; Melanie tested an off-list correction, and the patch landed with that small call correction as 2a8a00674e #62 #64 #65.
- A Coverity warning prompted Tom to recommend resetting per_buffer_data inside each heap-scan iteration, and Melanie implemented that discussion-only cleanup as c623e8593e #66 #67.
- Ranier Vilela proposed assigning per-buffer data on the read-stream fast path, but Andres explained that this path excludes streams carrying such data; Tom instead suggested an assertion to catch caller mistakes #69 #70 #73.
- Thomas followed with a separate typed-wrapper API for retrieving and storing stream data, then revised pointer-size assertions to permit variable-sized storage; this work was later moved to the PostgreSQL 19 drafts commitfest #75 #76 #77.
Oct - Nov 2025 · 1 entry
- The thread ended with another Coverity discussion about inconsistent offset-array bounds: Tom proposed using MaxHeapTuplesPerPage and clamping the count, Melanie supported the smaller array, and John Naylor questioned the clamp and its relationship to the assertion, leaving that follow-up unresolved #78 #79 #80 #81.