model-writtenrun 8421 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tomas Vondra proposed SLRU statistics in #1, using backend-local counters sent to the statistics collector, fixed entries for built-in caches and an other bucket for extensions, with results exposed through pg_stat_slru.
- Takayuki Tsunakawa questioned how users could act on the statistics in #2, while Alvaro Herrera described their diagnostic value in #4; Tomas kept buffer sizing outside this patch's scope in #5 and confirmed that the view should be documented in #9.
- Masahiko Sawada suggested inlining counter functions and possibly disabling collection by default in #7, but Alvaro opposed a new tracking GUC and reviewed counter placement, misleading shared-buffer terminology and enum-based cache identification in #10.
- Tomas incorporated the initial review in #13, consolidating duplicate miss/read accounting and adding a shared reset operation with reset timestamps while retaining the fixed enum.
- After a month, Tomas changed cache identification to use existing LWLock tranche names in #14, retaining a fixed statistics array while removing the enum, dropping the I/O-error counter, adopting blks column names and documenting the view.
- Tomas added pg_stat_reset_slru(text) for individual or global resets in #15 and reported that his benchmark showed no measurable overhead, so the feature proceeded without a new tracking GUC.
- Tomas landed #15 as 28cac71bd3, with naming and catalog adjustments plus a consolidated statistics-file read, and announced the commit in #16.
- Noriyoshi Shinoda supplied a documentation type-name correction in #17, which Tomas committed unchanged as 2c220ca46f.
- Kuntal Ghosh identified missing hit accounting in SimpleLruReadPage_ReadOnly and supplied the correction in #19; Tomas confirmed the problem in #20 and committed the patch unchanged as 2b88fdde30.
- Fujii Masao found that pg_xact incorrectly appeared alongside clog and supplied code and documentation corrections in #21; Tomas initially committed only the code portion as 2e08d314ed.
- Fujii also observed that checkpointer activity was not being reported in #23, and Tomas agreed in #24 that checkpointer needed to send its accumulated SLRU statistics.
- Fujii pointed out the omitted documentation correction and broadened the process-reporting investigation in #25; Tomas then committed the documentation portion of #21, with reflow, as e685ca63ca.
- Fujii proposed clearing SLRUStats during process initialization in #28 to address counters starting nonzero, then supplied a separate timestamp-conversion correction in #29.
- After Tomas agreed with both fixes in #30, Fujii committed the initialization patch unchanged as f3d23d83ef and the timestamp patch unchanged as 043e3e0401.
- Tom Lane challenged the initialization fix in #32 because static-storage variables already start zeroed, then warned in #38 that any counts accumulated by the postmaster would be inherited by its children.
- Fujii reproduced postmaster counter updates through AsyncShmemInit in #39, and Alvaro argued against that postmaster activity in #40, establishing that the nonzero counters reflected inherited work rather than missing C initialization.
- Tom supplied a replacement approach in #43 that delayed the first async SLRU write until a backend needed it and asserted that the postmaster never recorded SLRU counts; he reported passing check-world, and Fujii specifically supported retaining the assertion in #45.
- Tom committed that approach as 7fd89f4d7a, adding explanatory comments and reverting the initialization change from f3d23d83ef.
- Fujii's further investigation in #47 found that autovacuum and parallel workers reported statistics at exit, but left checkpointer reporting, shutdown-checkpoint counts, and broader startup-process and logical-walsender reporting issues unresolved.
- Robert Haas proposed shared-memory aggregation in #48, but Tom advised addressing that through the wider statistics-collector redesign in #49; the feature and attached fixes had landed, while the process-reporting questions remained open.