model-writtenrun 2635 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Sep 2024 - Jan 2025 · 22 entries
- Bertrand Drouvot proposed per-backend I/O instrumentation in #1, using fixed shared-memory slots, a pg_my_stat_io view, and a PID-based accessor, with snapshot consistency initially reserved for the current backend.
- Kyotaro Horiguchi questioned fixed storage and discussed permissions and optional collection in #2 and #3; Bertrand argued in #5 that allowing individual sessions to disable collection would undermine administrator visibility.
- Álvaro Herrera identified unnecessary storage for every backend type in each backend's counters in #6, and Bertrand reduced each entry from roughly 16 KB to 1040 bytes in #8.
- Nazir Bilal Yavuz tested the early implementation and found reset timestamps leaking across reused process slots in #10; Bertrand corrected initialization and shutdown handling in #12, and Nazir confirmed the fix in #13.
- Michael Paquier objected to the flexible-array extension of shared statistics memory and proposed a ProcNumber-keyed dynamic hash in #18; Bertrand argued that departed sessions' counters need not survive restart in #19, and Michael accepted that lifecycle in #21.
- After further design discussion, Bertrand chose a separate variable-numbered backend statistics kind while preserving the existing global I/O kind in #23, with Michael supporting the separation in #26; the implementation appeared in #30 alongside proposed flush merging and snapshot exclusions.
- Michael's review in #31 challenged backend-specific exceptions in generic statistics code, stored backend types, and snapshot restrictions, and requested a separate implementation file and persistence-control work.
- Startup-time assertions exposed problems with creating entries before statistics restoration; a related infrastructure proposal moved to another thread in #36, and Michael proposed excluding auxiliary processes because their individual activity was already represented globally in #43.
- Bertrand's revised patch in #46 excluded auxiliary processes, introduced pgstat_backend.c, kept independent global and backend flush paths, separated backend resets from global resets, and deferred the snapshot exception.
- December review simplified the interface and lifecycle: #51 removed pg_my_stat_io, #53 added shutdown deletion and the general reset API, and #55 delayed entry creation until authentication had succeeded.
- While reviewing that work, Michael independently corrected two generic statistics comments in fee2b3ea2e, then supplied naming, lookup, documentation, and test edits in #56.
- Michael extracted the duplicated tuple-building logic in #60, and Bertrand folded those edits into #61, renamed the helper pg_stat_io_build_tuples(), and separated the refactoring from the feature.
- The prerequisite from #61 landed as ff7c40d7fd with a comment edit, followed by the feature as 9aea73fc61; Michael's concurrent-exit testing added a missing NULL check before landing, as reported in #63.
- Alexander Lakhin reported and reproduced a failing fsync assertion in #65; Bertrand explained that a backend can perform fsync itself and supplied #66, which landed with an additional comment clarification as 546371599e.
- Bertrand began extending the framework to per-backend WAL statistics and moved that work into a dedicated thread in #71, while Michael agreed to review its associated refactoring there in #72.
- After examining earlier consistency discussions, Bertrand withdrew the proposed backend-specific snapshot exception in #73, and Michael agreed in #74 that backend statistics should follow the same consistency model as other statistics.
- WAL-related development exposed that the landed backend counters allocate pending memory inside critical sections: Nazir reported the failure in #75 and additional allocation and bootstrap issues in #79, with the WAL-specific bootstrap issue redirected to its own development thread in #80.
- Andres Freund rejected allowing those allocations inside critical sections and called for allocation-free I/O counting in #84; Michael proposed static pending storage in #85, and Bertrand implemented it in #88.
- Michael replaced the initial backend-specific flush exception with generalized callbacks and encapsulated static storage in #90; Bertrand then corrected subset clearing and pending-data detection in #91, before adopting the agreed callback names in #93.
- The separate copyright correction attached in #91 was absent from #93 and is not included in either supplied pending-statistics commit.
- Michael split #93 into callback generalization, 28de66cee5, and static backend pending storage, 4feba03d8b, with comment cleanup, removal of the obsolete pending_size setting, and reordered early checks.
- At the final message, #94, Michael confirmed both follow-up changes were committed to unblock the WAL proposals; the backend I/O feature and its substantive fixes had landed, while WAL extensions continued separately and the snapshot exception had been abandoned.