Re: per backend WAL statistics
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Attachments
- v15-0001-per-backend-WAL-statistics.patch (text/x-diff)
Hi, On Wed, Mar 05, 2025 at 09:18:16AM -0500, Andres Freund wrote: > Hi, > > On 2025-03-05 13:03:07 +0000, Bertrand Drouvot wrote: > > But yeah, if 0002 in [1] does not go in, then your concern is valid, so adding > > the extra check in the attached. > > This crashes in cfbot: > > https://cirrus-ci.com/task/5111872610893824 > Thanks for the report! I usually always run a make check-world locally and also launch the CI tests on my github repo before submitting patches. This time, that was a one line change (as compared to v13), so confident enough I did not trigger those tests. Murphy's Law I guess ;-) So yeah, back to the issue, we have to pay more attention for the WAL stats because pgWalUsage is "incremented" without any check with pgstat_tracks_backend_bktype() (that's not the case for the IO stats where the counters are incremented taking into account pgstat_tracks_backend_bktype()). So for the moment, in the attached I "just" add a pgstat_tracks_backend_bktype() check in pgstat_backend_have_pending_cb() but I'm not sure I like it that much... Will think more about it... Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
Commits
-
Fix use-after-free in pgstat_fetch_stat_backend_by_pid()
- 3191a593d6de 18.0 landed
-
Remove initialization from PendingBackendStats
- f554a95379a9 18.0 landed
-
Add WAL data to backend statistics
- 76def4cdd7c2 18.0 landed
-
Improve check for detection of pending data in backend statistics
- 9a8dd2c5a6d9 18.0 landed
-
Fix some gaps in pg_stat_io with WAL receiver and WAL summarizer
- f4694e0f35b2 18.0 landed
-
Handle auxiliary processes in SQL functions of backend statistics
- 3f1db99bfabb 18.0 landed
-
Invent pgstat_fetch_stat_backend_by_pid()
- c2a50ac678eb 18.0 landed
-
Refactor code of pg_stat_get_wal() building result tuple
- 495864a4cf16 18.0 landed
-
Adding new PgStat_WalCounters structure in pgstat.h
- 0e42d31b0b22 18.0 landed
-
Remove pgstat_flush_wal()
- d7cbeaf261da 18.0 landed
-
Refactor some code related to backend statistics
- 2c14037bb57c 18.0 landed
-
Add backend-level statistics to pgstats
- 9aea73fc61d4 18.0 cited