model-writtenrun 2438 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jun 2023 - Feb 2024 · 10 entries
- Nazir Bilal Yavuz opened the thread with a small patch exposing WAL writes and fsyncs in pg_stat_io, while asking how track_io_timing and track_wal_io_timing should interact #1.
- Melanie Plageman requested WAL reads, a separate initialization context, meaningful operation sizes, restrictions on unsupported combinations, and shared timing helpers; Nazir incorporated this broader design in #3 after her review in #2.
- Melanie then requested tests and clearer counter documentation in #4, leading to normal-context write/fsync tests in #5, while streaming-replication coverage remained deferred because WAL reads could have variable sizes.
- Michael Paquier questioned mixing timing controls and suggested a separate WAL view in #6, but Nazir's benchmarks in #8 persuaded him to retain independent timing switches in #9.
- Andres Freund argued that pg_stat_io should collect all I/O sources in one view in #10 and proposed feeding existing pg_stat_wal columns from it to avoid duplicate accounting in #12.
- After correcting recovery statistics flushing in #16, Nazir added documentation, initialization/read tests, backend restrictions, and shared timing retrieval in #22; Michael highlighted the differing write-count semantics and unwanted PendingWalStats coupling in #18.
- Michael's review in #23 prompted an explicit timing argument and SQL-level timing aggregation in #24, and he committed the helper prerequisite with declaration and editorial fixes as 3c9d9acae0, announcing it in #25.
- Michael consolidated the remaining patches in #26 and fixed WAL timings incorrectly entering buffer statistics, then traced a WAL-receiver assertion to segment initialization in #27.
- Variable-sized WAL reads still prevented reliable operation-size reporting, so Nazir explicitly disabled WAL-receiver accounting in #34 following the discussion in #28 and #33.
- Melanie proposed separate byte counters in #37, but uncertainty about variable-sized and asynchronous I/O led Michael to recommend postponement in #42, which Nazir accepted in #43.
Apr - Jul 2024 · 1 entry
- Nazir reopened the design discussion in #46; Bharath Rupireddy emphasized disk-read coverage in #48, Amit Kapila supported centralized WAL statistics and hit counters in #49, and Melanie clarified that WAL hits would be separate from relation hits in #53, resolving Nitin Jadhav's concern in #54.
Jan - Mar 2025 · 12 entries
- After pg_stat_io gained byte accounting elsewhere, Nazir resumed implementation and supplied an isolated initdb pending-statistics assertion reproducer in #55; Michael reported that prerequisite fixes had removed that obstacle in #56.
- The renewed series in #57 added WALRead() instrumentation and per-backend statistics, separated pg_stat_wal timing reuse, and temporarily bundled Andres's shutdown-order work because WAL senders could otherwise report statistics after the checkpointer exited.
- Once the shutdown prerequisite landed, Michael resent the unchanged remaining patches in #60; Nazir repaired premature removal of pg_stat_wal timing updates in #62 and removed redundant recovery flushing in #66.
- Bertrand Drouvot's tests in #58 exposed differing byte totals between the views, which Nazir explained in #65 as generated WAL versus actual disk writes, with Bertrand accepting the distinction in #67.
- The timing-switch debate resumed when Michael proposed simplification in #64 and Bertrand opposed losing independent WAL timing control in #68; Michael's streamlined patch in #71 ultimately used track_io_timing for pg_stat_io while preserving pg_stat_wal's existing timing mechanism.
- Before posting that streamlined patch, Michael extracted Nazir's counter documentation from #66, polished it, and committed b998fedab7, as explained in #71.
- Bertrand identified overcounting when wal_init_zero was disabled in #72 and reported no noticeable benchmark regression in #73; Michael confirmed comparable results in #75 and committed #71 with the one-byte initialization correction and statistics-format update as a051e71e28.
- Michael declared the main goal complete in #79 and directed potential backend-restriction refactoring and pg_stat_wal column simplification to separate threads; Nazir expressed interest in continuing those topics in #88.
- Tom Lane reported failing WAL-read tests in #80 and traced them to repeated installcheck runs against an existing cluster in #82, revealing that the tests incorrectly assumed startup statistics were still present.
- Michael's repair in #85 moved startup-dependent checks into recovery TAP tests and dropped the initialization-fsync assertion; Bertrand and Nazir recommended 029_stats_restart.pl in #86 and #89, leading to the revised test implementation committed as 428fadb7e9.
- Ranier Vilela later supplied a one-line correction for a duplicated autovacuum-worker condition in #91, Nazir approved it in #92, and Michael committed it unchanged as 17d8bba6da so unsupported autovacuum-launcher WAL reads display NULL instead of zero.
- The thread ends with Ranier's acknowledgment in #94: the main feature and both reported follow-up fixes have landed, while the pg_stat_wal simplification and optional restriction refactoring remain separate follow-up work identified in #79.