model-writtenrun 2991 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Nazir Bilal Yavuz proposed replacing ANALYZE's separate prefetch and buffer-read machinery with streaming reads driven by BlockSampler, bundling the uncommitted infrastructure and reporting fewer read calls in #1.
- Nazir updated the dependency through #2 and #3, selected maintenance I/O behavior, and reported improvements across cold-cache and warm-cache benchmarks.
- Melanie Plageman recommended removing stale API names and redundant per-buffer block-number storage, and raised moving streaming and sampling responsibilities into heap-specific code in #4; Nazir adopted the local simplifications in #5, explaining that an intervening upstream change had already made ANALYZE heap-specific.
- After the streaming infrastructure landed, Jakub Wartak benchmarked the ANALYZE conversion and found it satisfactory in #6, while Nazir submitted the remaining conversion against the committed API in #7.
- Heikki Linnakangas reported a reproducible invalid-buffer assertion in #8, and Nazir responded in #10 by terminating sampling when the stream returned no valid buffer instead of relying on the initial block count.
- Melanie supplied optional inlining, HeapScanDesc, and sampler-cleanup changes in #11; Nazir retained them as a separate follow-up with documentation and small refinements in #12.
- Melanie expanded the refactoring into a preliminary relocation of tuple sampling into analyze.c in #13 and corrected comments in #14, but Andres Freund objected to the combined movement and restructuring in #15.
- Melanie abandoned the broad refactoring and returned to Nazir's earlier conversion with a simplified loop condition in #16; Thomas Munro committed its first patch as 041b96802e, making only naming and comment edits to that patch and reporting benchmark results in #17.
- Thomas left the BlockSampler_HasMore() cleanup uncommitted and reposted it in #18, explaining that he lacked time to establish whether removing the sampling cross-check was justified.
- Nazir corrected his earlier diagnosis in #19: BlockSampler_Init() did predict the number of sampled blocks, and an intervening upstream fix had resolved the observed failure.
- After the upstream removal of ANALYZE table-access-method callbacks was reverted, Nazir reopened the placement question in #20 and proposed a revert-plus-replacement series in #21, using a heap-controlled flag to preserve the old interface for other access methods.
- Melanie favored retaining the landed implementation because of the release schedule and the already block-oriented sampling interface in #22, leaving Nazir's alternative unadopted.
- Mats Kindahl reported a concrete PostgreSQL 17 beta compatibility problem in #23: Timescale needed sampling across different underlying relations, so he proposed accessors for the stream's callback and strategy.
- Mats explained the extension's encoded block numbers and replaced the accessor proposal with exposed ReadStream internals in #25; Thomas later explained in #30 that opacity protected minor-release compatibility and planned asynchronous-I/O changes, while direct manipulation could incorrectly combine reads across relations.
- Thomas proposed reverting the ANALYZE conversion in #26, Robert Haas questioned such a late release-candidate change in #27, and Michael Banck requested a definite status because release announcements already advertised the feature in #31.
- Thomas offered a smaller alternative in #32: read_stream_next_block() would expose raw sampled block numbers and the buffer strategy without reading buffers, preserving extension workarounds while retaining streaming ANALYZE; he outlined possible future chained streams in #33.
- Mats supported the narrow fix in #36 and combined it with an exported statistics-computation helper in #37, reporting that his extension implementation produced plausible sampled statistics.
- Thomas committed only the raw-block API from that combined submission as ec1d545c8f, with comment and placement edits and a backport to PostgreSQL 17; in #38 he closed the release blocker and deferred the statistics-helper refactor because it was nonessential so close to release.
- The thread ended with streaming ANALYZE retained and the compatibility fix landed: Mats confirmed in #39 that he could duplicate the statistics-helper code locally, while broader extension sampling improvements remained future work.