model-writtenrun 7040 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Geoghegan proposed exposing primitive index-search counts for index, index-only, and bitmap index scans in #1, explaining that SAOP locality and runtime skip-scan decisions make the number of searches impossible to infer reliably from the plan alone.
- Matthias van de Meent questioned whether the metric belonged in generic scan descriptors or an access-method-specific framework in #2 and #6, while Peter defended consistent output across access methods and explained why relation-wide statistics could not reliably identify individual scans in #7 and #14.
- Peter renamed the output to “Index Searches” in #8; Robert Haas preferred that terminology in #9, while Tom Lane questioned its usefulness and output clutter in #11, prompting further discussion of VERBOSE-only output and alternative counter placement.
- The independent accounting bug identified in #1 landed on September 20 as fb4f5e58af, making parallel workers count actual index descents rather than every _bt_first call; although the relocation appeared in #8, its latest matching source was #571751 in thread #49869, which now receives the commit attribution.
- After a gap, Alena Rybakina rebased the patch and reported doubled statistics in #26; her attachment inadvertently duplicated the accounting call that had already landed, while Peter supplied his separately maintained skip-scan-series version in #27.
- Peter’s replacement in #27 divided searches by loop count, attributing that preference to Tomas Vondra, but Matthias argued in #31 and #33 that rounding averages destroys information users cannot reconstruct.
- The update in #34 accommodated EXPLAIN’s new default buffer output and added Bloom counter maintenance, while retaining the existing descriptor-based design.
- Peter accepted Matthias’s argument in #35 after finding parallel scans could display zero searches through division and rounding, Alena agreed in #36, and #38 restored total counts across loops.
- Robert supported the feature and compared four storage approaches in #39; Peter explained why access methods must maintain counters directly in #40, then added concrete SAOP documentation examples and refined output and parallel counting in #41.
- Peter announced the first feature landing in #43: 5ead85fbc8 took #41 with light comment, documentation, and test cleanup.
- Peter reported reverting that landing in #44 because debug_parallel_query exposed missing statistics when the leader did not participate, and clarified in #46 that even serial index scans can execute inside parallel workers without shared scan state.
- Robert recommended accumulating counters separately in each process and aggregating them afterward in #47; Peter adopted executor-owned instrumentation with a pointer from IndexScanDesc and explicit worker-statistics transfer in #49, reporting successful tests with debug_parallel_query=regress.
- After refinement in #50, the feature landed again on March 11 as 0fbceae841, with additional shared-memory initialization changes and accumulation of worker counts across Gather rescans.
- The final discussion concerned future extensions rather than an outstanding feature patch: Andres Freund asked about adding separate index and table buffer statistics in #51, and Peter agreed in #52 that dynamically allocating the instrumentation would avoid unnecessary memory growth outside EXPLAIN ANALYZE.