model-writtenrun 2391 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jan - Apr 2025 ยท 27 entries
- Bertrand Drouvot proposed pg_stat_get_backend_wal(pid) in #1, allowing WAL activity to be attributed to individual backends and aggregated by application or database, with two preparatory refactors ahead of the feature.
- Michael Paquier proposed a single flag-controlled flushing interface instead of passing locking decisions through separate routines in #2; Bertrand adopted it in #3, then incorporated Michael's revised locking and public flag arrangement from #4 into #5.
- Michael committed the backend refactor from #5 as 2c14037bb5, additionally removing the redundant pending-I/O typedef, and Bertrand resent the remaining work in #7.
- After Michael questioned the separate pending-WAL mechanism in #8, Bertrand tried dynamically allocated backend pending entries and an exception for critical-section allocation in #9, while separating PgStat_WalCounters into its own patch.
- Andres Freund rejected unrestricted allocation inside critical sections in #10 and advocated a common static-storage pattern for backend statistics in #12; Bertrand's replacement in #14 used the newly available PendingBackendStats storage.
- Rahila Syed's review in #17 questioned auxiliary-process exclusion, suggested explicit auxiliary PID lookup, and raised naming and timing-code concerns; Bertrand retained the name for consistency and deferred overlapping changes while related WAL-I/O work proceeded in #18.
- Bertrand proposed retaining only WAL records, full-page images, bytes, and buffer-full counts in #19, because writes, syncs, and their timings were now available through backend I/O statistics.
- Michael suggested moving wal_buffers_full into WalUsage in #20, and the participants agreed in #21 and #22 to pursue that prerequisite separately so backend WAL statistics could use a single source of counters.
- The revised series in #30 removed duplicated write/sync columns and PendingWalStats, substantially simplifying the feature; Michael supported the removal after checking the counter equivalence in #31, and Bertrand moved that prerequisite into another thread in #32.
- After the column-removal prerequisite landed elsewhere, #34 resumed this thread with the three remaining patches; Michael's review in #35 then prompted shared PID lookup and a separate WAL-flush cleanup in #36.
- Michael committed the WAL-flush cleanup from #36 as d7cbeaf261, deleting the unnecessary wrapper instead of merely making it static.
- Michael committed PgStat_WalCounters from #36 as 0e42d31b0b, moving it ahead of tuple extraction and adding explanatory comments and a statistics-format bump, as reported in #37.
- Bertrand explained the need for a NULL reset timestamp in backend results in #38, whose tuple-building component then landed with comment edits as 495864a4cf.
- The PID lookup helper remained in pgstat_backend.c for reuse beyond SQL callers, following the discussion in #40 and #41; it landed from #40 as c2a50ac678, with a consistent name and initialized backend-type output.
- Bertrand implemented Rahila's auxiliary-process suggestion as a separate component of #42, which Michael committed with conditional-flow cleanup as 3f1db99bfa, also enabling backend I/O reporting through pgstat_report_wal().
- Michael identified missing periodic reports from the WAL receiver and summarizer in #44, then supplied #47 with reporting calls, WAL-only row filtering, and two TAP tests; Bertrand reviewed their placement and coverage in #48.
- That reporting fix landed as f4694e0f35 from #47, with the summarizer report moved inside its wait routine and comments revised.
- Bertrand corrected the feature's early flush exit to consider WAL data in #46; Xuneng Zhou then found that the pending callback also needed a WAL check in #50, producing #51.
- Andres reported a checkpointer shutdown assertion in #52, revealing that WAL usage could be nonzero even for processes excluded from backend statistics; Bertrand added a backend-type guard in #53 and isolated it as a prerequisite in #55.
- The guard from #55 landed as 9a8dd2c5a6, with Michael also adding an explicit PendingBackendStats initializer, which Bertrand questioned because of possible future padding in #59.
- Michael's final review in #60 made pending checks respect the requested flush flags to avoid unnecessary locking, and Bertrand narrowed the I/O memory check to its specific member in #61.
- Nazir Bilal Yavuz reviewed flush placement and the WAL pending predicate in #62; Bertrand explained why independent statistics callbacks should remain separate in #63, and Nazir accepted that reasoning in #64.
- The main feature landed from #61 as 76def4cdd7, retaining the narrowed I/O check while restoring independent if-statements and adding the catalog-version bump, as Michael explained in #65.
- Tom Lane reported initializer warnings across buildfarm members in #67; Bertrand supplied #68 to remove the initializer, and that exact one-line correction landed as f554a95379.
- Alexander Lakhin reported a sanitizer-detected use-after-free with snapshot consistency in #70; Bertrand reproduced it for both backend WAL and I/O functions and supplied #72 to move statistics fetching after all backend-status accesses.
- The lifetime fix landed as 3191a593d6 from #72, with an additional B_INVALID failure result and a warning about invalidated pointers, completing the reported repair in #74.
- By #74, the feature and both post-commit corrections had landed with no submitted patch left outstanding; broader backend-statistics support for excluded auxiliary processes remained future work, as discussed in #44.