model-writtenrun 8448 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jun - Jul 2023 · 3 entries
- Tomas Vondra opened the project with AM-specific heap-page prefetching for ordinary index scans, reporting substantial random-I/O gains while leaving index-only scans, distance ordering and layering unresolved #1.
- Peter Geoghegan argued for treating index and bitmap scans as related designs and exploiting TID locality, while Andres Freund wanted higher-level control and measurements of fully cached workloads #4 #6 #5 #11.
- Sequential and cyclic workloads exposed redundant prefetch costs, so Tomas added recent-block caching and sequential-pattern suppression, then replaced per-AM prefetch callbacks with an indexam.c TID queue that could cross leaf-page boundaries #15 #16.
Oct 2023 - Mar 2024 · 4 entries
- After adding index-only prefetch, Tomas experimented with preadv2 to inspect the operating-system cache, abandoned that approach after poor results, and moved prefetch state into the executor while improving visibility-map reuse #18 #19 #20.
- Robert Haas proposed producer callbacks and Andres advocated opting selected callers into prefetch; Tomas implemented a StreamingRead-like interface, moved it into execPrefetch.c, and adopted execute_once to avoid unsafe cursor direction changes #21 #27 #36 #37 #38.
- Konstantin Knizhnik reported successful Neon integration and questioned storage-specific heuristics, while Melanie Plageman developed a real StreamingRead alternative and Tomas fixed missing index-tuple retention in index-only queues #40 #47 #63 #66.
- Melanie's fuller implementation exposed broken kill_prior_tuple feedback, mark/restore and cursor handling, establishing that look-ahead required index-AM cooperation over page lifetime and TID recycling; unresolved correctness questions kept this approach out of PostgreSQL 17 #70 #77 #85 #94 #95.
Aug - Nov 2024 · 1 entry
- After a long gap, Tomas returned with explicit per-leaf batches, added other index AMs and mark/restore, moved batching behind the index API, and began converting direct prefetch requests to read streams #99 #100 #101 #102.
Apr - May 2025 · 1 entry
- The April 2025 redesign introduced amgetbatch/amfreebatch and multiple live batches managed centrally, but cursor and array-key difficulties prompted Tomas to publish a simpler single-leaf alternative alongside the complex series #117 #121.
Jul 2025 · 4 entries
- Tomas refreshed the simple alternative while Peter fixed the complex version's cursor and array-scan bugs and reduced its nbtree footprint, explicitly crediting Tomas with almost all of the existing implementation #122 #123 #150.
- Benchmarking exposed prefetch-distance collapse after stream resets, leading to Tomas's independent reset-distance patch and Thomas Munro's exploration of separate end-of-stream state and sustained look-ahead #160 #166 #168 #171.
- Andres identified that generic code was incorrectly translating table TIDs into heap blocks and proposed putting read streams and batch consumption under table-AM control, also enabling amortized heap locking and HOT-chain searches #157 #162.
- Peter showed why realistic leaf pages containing few distinct heap blocks benefit from cross-leaf look-ahead, and revised benchmarks moved the group toward the complex design; Tomas added EXPLAIN and experimental pgstattuple diagnostics to investigate it #176 #193 #199 #201 #203 #214.
Aug 2025 · 2 entries
- Peter took over posting the consolidated complex series, while Andres traced unexpectedly poor scan performance to repeated requests waiting prematurely on in-flight I/O and supplied a deferred-wait prototype that Peter measured as a major improvement #228 #263 #274 #275.
- Delaying read-stream creation until the second batch reduced cached point-lookup overhead, but Tomas still observed collapsing distance and tried an adaptive-window fix; an assertion correction left a mergejoin hang, and Thomas's alternative sustain-window experiment was rebased separately #288 #293 #301 #302 #317.
Sep 2025 - Jan 2026 · 5 entries
- The next consolidated series incorporated deferred waits, batch caching, delayed startup and a low-distance disabling heuristic, leaving experimental distance patches out; Tomas warned about performance cliffs before a sequence of maintenance rebases #328 #329 #332 #333 #336.
- With progress stalled, Peter and Tomas separated independently useful AM changes from prefetch, and Andres endorsed table-AM ownership and moving visibility-map checks into heapam; the December redesign introduced slot-based scans, reusable batch helpers and hash batching while temporarily disabling index-only prefetch #337 #339 #340 #346.
- Konstantin's experiments showed that waiting for a second batch could miss useful prefetch opportunities, producing threshold deltas based first on tuples and then reads, while the main series simplified batch control and restored index-only prefetch #368 #376 #380 #381.
- Peter replaced reset-and-drain workarounds with pause/resume and a principled pin-release design: visibility information must be cached before releasing the TID-recycling interlock, and fake LSNs extend safe dead-item marking to unlogged indexes #382 #383.
- Subsequent work made visibility caching less eager, explored LIMIT hints and read-stream yielding, and reduced allocation overhead, but benchmarks and Andres's review showed that yielding could prevent useful I/O concurrency #385 #386 #424 #431.
Feb - Mar 2026 · 8 entries
- Andres's abstraction review led to AM-private batch layouts and an explicit release callback, while his wait-sensitive read-stream improvements let Peter remove yielding entirely from the main design #450 #451 #456.
- Alexandre Felipe reported worker-submission contention and Tomas confirmed it; Tomas's fix carried in #450 landed with comment cleanup as 29a0fb2157, using conditional queue locking and synchronous fallback #448 #449.
- Testing also uncovered Andres's incorrect private-refcount cache hint, and the exact one-line fix carried in #450 landed independently as 6322a028fa.
- Tomas reviewed the simplehash conversion and unnecessary btree stack allocation in #450, and Peter landed them with minor cleanup as a367c433ad and d071e1cfec #453 #454.
- The shared fake-LSN extraction and nbtree dropPin extension from #456 landed as d774072f00 and 8a879119a1, with comment/base adjustments and essentially unchanged nbtree logic, leaving the remaining prefetch series to continue #457.
- Peter kept the existing planning-time VISITED_PAGES_LIMIT policy inside heapam rather than pursuing an unsettled replacement, and specialized scan callbacks; the instrumentation-pointer and hash fake-LSN members of #459 then landed as f026fbf059 and e5836f7b7d, the latter with consolidated modification bookkeeping #464.
- Review drove a split between mechanical heapam file movement, the slot API, and batching, followed by clearer table-AM ownership of batch state and separate constraint-enforcement fetch_tid calls #461 #471 #474 #477.
- Andres's background-completion check and WaitReadBuffers wait-status patches carried in #474 landed as 6e648e353f and 513374a47a, with only obsolete-comment removal in the former; their detailed review occurred in thread #139184, but this thread carried the latest matching attachments.
Apr 2026 · 4 entries
- The synchronous fast-path read and slower distance-decay patches carried in #477 were subsequently posted in thread #139184 as #999746, whose exact versions landed as cceb1bf45e and 6e36930f9a, addressing dispatch overhead and hit/miss-driven distance collapse.
- Following Andres's review, four prerequisites from #479 landed as 1adff1a0c5, a29fdd6c8d, c7d09595e4 and 2d3490dd99: argument renaming, heapam_indexscan.c extraction, explicit heap-block tracking and pin retention across resets, with dependency adjustments for the still-pending slot API #480 #483.
- The remaining read-stream improvements carried in #479 landed as a9ee668817, 8ca147d582 and f63ca33790, retaining the large-I/O async heuristic and refining the separation between combining distance and wait-driven asynchronous read-ahead; review proceeded in thread #139184, while this thread supplied the latest matching submission.
- Only eight patches remained after those landings, but the invasive core feature was deferred to PostgreSQL 20 because review details and late design changes exceeded the available feature-freeze time, despite broadly acceptable performance #483 #486 #487.
May - Nov 2026 · 17 entries
- Peter resumed after the break and added GiST batching plus genuinely virtual-slot index-only scans, removing IndexFetchTableData; ordered GiST index-only scans were disabled because their required pin/interlock behavior could not be maintained safely #488 #489.
- The next revisions moved ring-buffer management into reusable helpers and added non-MVCC test infrastructure, then introduced SP-GiST batching, a fourth-heap-block-switch startup rule and throttling for batches with no useful heap reads #490 #491.
- SP-GiST long-value index-only scans were left unsupported because reconstruction metadata could exceed the bounded batch workspace, while an independent planning-time index-page limit and EXPLAIN IO support were added to the working series #491 #492.
- Tomas reviewed the slot-interface patch and requested clearer reusable-helper and visibility comments; subsequent revisions addressed that feedback and rebased the series through August #493 #494 #495 #496 #497.
- Peter extracted the visibility-map memory-ordering explanation from #497 and committed it with a short executor cross-reference as 903d9d12cc, following Andres's relocation suggestion and Tomas's review #460 #493.
- The statistics tests and non-MVCC test module embedded in #497 landed separately as 83032dc42c and f7a563ccd1, with test refinements and adaptation to the existing scan interface; the next submission retained the slot API and optimized its remaining index-only overhead #498.
- Rui Zhao tested the slot patch extensively and supplied a header-split delta, after which Peter separated table-AM and index-AM helper modules and fixed delayed predicate-lock acquisition in the pending batch path #499 #500.
- The slot-based table-AM interface from #500 landed with light documentation and assertion cleanup as ddce1da5b1, while Tomas's pending-read reset fix landed with an explanatory comment as 862092932c to prevent wasted I/O when resetting a stream #501.
- The following remainder dropped those committed pieces and moved the uncommitted get_actual_variable_range index-page limit into its own thread because it had become independent of prefetch #501.
- Rui then found an SP-GiST INCLUDE-only crash caused by reconstructing an unrecoverable polygon key from its stored box representation, supplying a delta that returns a null key while preserving INCLUDE data #505.
- Repeated requests for the same heap blocks were found to consume stream capacity and disrupt distance and combining heuristics, so Peter added request deduplication, overhauled hash sibling traversal and pin ownership, and folded in Rui's crash fix #504 #508.
- Tomas stress-tested the updated series and supplied documentation corrections, while Bilal Kahraman demonstrated that the SP-GiST reconstruction bug also caused wrong results and crashes on released branches and adapted Rui's fix to their old scan path #509 #512.
- Peter subsequently suppressed posix_fadvise hints under io_method=sync after variable benchmark results, renaming the existing read-stream flag to READ_STREAM_NO_ADVICE while retaining the pending batching, prefetch and supporting patches #513.
- Greg Burd reviewed the remaining design for external table AMs, raising batch-callback compatibility, per-item rechecks, index tuples during plain scans, richer entry feedback and assumptions about repeated TIDs #515.
- Bilal's existing-path SP-GiST fix continued with a later submission #1165618 in thread #258481 and landed as 0c9fc1a96b, guarding reconstruction with canReturnData and returning null for non-returnable keys; the commit credits Rui's report and backpatches through PostgreSQL 15.
- Peter's next submission rebased the twelve-part series onto the SP-GiST fix, removed its now-redundant regression additions, refined hash split-bucket bookkeeping and pin release, simplified batch traversal, and expanded interface and prefetch documentation #516.
- At the latest submission, core batching, heap prefetching, the remaining AM conversions, EXPLAIN IO, request deduplication and AIO prerequisites remain pending, with no explicit resolution of Greg's external-AM requests in the new message #515 #516.