Re: Show WAL write and fsync stats in pg_stat_io

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Cc: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, "bharath(dot)rupireddyforpostgres(at)gmail(dot)com" <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: Show WAL write and fsync stats in pg_stat_io
Date: 2025-01-27 00:52:23
Message-ID: Z5bYx2_ztPCg06QK@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 24, 2025 at 06:29:46PM +0300, Nazir Bilal Yavuz wrote:
> By saying that, this does not solve the problem; there is still a
> difference although you omit WAL initialization stats from the
> pg_stat_io.

Reattaching the remaining patches to make the cfbot happy, as 0001 has
been applied as 87a6690cc695.

- if (track_wal_io_timing)
- {
- instr_time end;
-
- INSTR_TIME_SET_CURRENT(end);
- INSTR_TIME_ACCUM_DIFF(PendingWalStats.wal_write_time, end, start);
- }

In 0002, you are removing PendingWalStats.wal_write_time, which does
not seem OK to me because we should still aggregate this data for
track_wal_io_timing, no?
--
Michael

Attachment Content-Type Size
v10-0002-Add-WAL-I-O-stats-to-both-pg_stat_io-view-and-pe.patch text/x-diff 23.0 KB
v10-0003-Fetch-timing-columns-from-pg_stat_io-in-the-pg_s.patch text/x-diff 8.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2025-01-27 01:47:18 Re: speedup COPY TO for partitioned table.
Previous Message Michael Paquier 2025-01-27 00:30:16 Re: POC: track vacuum/analyze cumulative time per relation