Re: Show WAL write and fsync stats in pg_stat_io
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Nazir Bilal Yavuz <byavuz81@gmail.com>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>, Melanie Plageman <melanieplageman@gmail.com>, Andres Freund <andres@anarazel.de>, pgsql-hackers <pgsql-hackers@postgresql.org>, "bharath.rupireddyforpostgres@gmail.com"
<bharath.rupireddyforpostgres@gmail.com>, Thomas Munro <thomas.munro@gmail.com>
Date: 2025-02-03T04:07:26Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix copy-paste error related to the autovacuum launcher in pgstat_io.c
- 17d8bba6dad1 18.0 landed
-
Move SQL tests of pg_stat_io for WAL data to recovery test 029_stats_restart
- 428fadb7e97e 18.0 landed
-
Add data for WAL in pg_stat_io and backend statistics
- a051e71e28a1 18.0 landed
-
Improve comment on top of pgstat_count_io_op_time()
- b998fedab74c 18.0 landed
-
Refactor pgstat_prepare_io_time() with an input argument instead of a GUC
- 3c9d9acae0bc 17.0 landed
Attachments
- v13-0001-Add-WAL-I-O-stats-to-both-pg_stat_io-view-and-pe.patch (text/x-diff) patch v13-0001
On Fri, Jan 31, 2025 at 11:29:31AM +0300, Nazir Bilal Yavuz wrote: > On Wed, 29 Jan 2025 at 18:16, Bertrand Drouvot > <bertranddrouvot.pg@gmail.com> wrote: >> I think that's the main reason why ff99918c625 added this new GUC (looking at >> the commit message). I'd feel more comfortable if we keep it. > > As Michael suggested, I will run a couple of benchmarks to see the > actual effect of this change. Then let's see if this affects anything. I've looked at bit at all that today, and something like the attached is what seems like the best streamlined version to me for the main feature. I am also planning to run some short benchmarks with track_io_timing=on on HEAD and with the patch, then see the difference, without any relationship to track_wal_io_timing. The comment additions in pgstat_count_io_op_time() were worth a patch of their own. This part has been applied as b998fedab74c, after a few tweaks of my own. -- Michael