Re: Show WAL write and fsync stats in pg_stat_io

Ranier Vilela <ranier.vf@gmail.com>

From: Ranier Vilela <ranier.vf@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Nazir Bilal Yavuz <byavuz81@gmail.com>, 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-03-19T12:10:00Z
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 →
  1. Fix copy-paste error related to the autovacuum launcher in pgstat_io.c

  2. Move SQL tests of pg_stat_io for WAL data to recovery test 029_stats_restart

  3. Add data for WAL in pg_stat_io and backend statistics

  4. Improve comment on top of pgstat_count_io_op_time()

  5. Refactor pgstat_prepare_io_time() with an input argument instead of a GUC

Em ter., 18 de mar. de 2025 às 20:34, Michael Paquier <michael@paquier.xyz>
escreveu:

> On Tue, Mar 18, 2025 at 04:13:15PM +0300, Nazir Bilal Yavuz wrote:
> > Thanks for the report! Yes, it is an oversight on my part.
>
> No worries.  It's most likely me while reviewing the whole as I've
> reordered these blocks a bit while going through the patch.
>
> This has little consequences for the end user, as the read, read_bytes
> and read_time should show up as 0 instead of NULL in the pg_stat_io
> view for the two WAL rows.  Still it is confusing to show zeros, and
> it makes queries of pg_stat_io a bit cheaper.  Will fix in a bit.
>
Thank you Michael.

best regards,
Ranier Vilela