From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Move wal_buffers_full from PgStat_PendingWalStats to WalUsage
Date: Mon, 17 Feb 2025 04:16:25 +0000
Message-ID: <E1tjsYS-007XrG-Pw@gemulon.postgresql.org> (raw)
Move wal_buffers_full from PgStat_PendingWalStats to WalUsage
wal_buffers_full has been introduced in pg_stat_wal in 8d9a935965f, as
some information providing metrics for the tuning of the GUC
wal_buffers. WalUsage has been introduced before that in df3b181499.
Moving this field is proving to be beneficial for several reasons:
- This information can now be made available in more layers, providing
more granularity than just pg_stat_wal, on a per-query basis: EXPLAIN,
pgss and VACUUM/ANALYZE logs.
- A patch is under discussion to provide statistics for WAL at backend
level, and this move simplifies a bit the handling of pending
statistics. The remaining data in PgStat_PendingWalStats now relates to
write/sync counters and times, with equivalents present in pg_stat_io,
that backend statistics are able to already track. So this should cut
all the dependencies between PgStat_PendingWalStats and WAL stats at
backend level.
As of this change, wal_buffers_full only shows in pg_stat_wal.
Author: Bertrand Drouvot
Reviewed-by: Ilia Evdokimov
Discussion: https://postgr.es/m/Z6SOha5YFFgvpwQY@ip-10-97-1-34.eu-west-3.compute.internal
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/eaf502747bacee0122668eb1ba3979f86b8d8342
Modified Files
--------------
src/backend/access/transam/xlog.c | 2 +-
src/backend/executor/instrument.c | 2 ++
src/backend/utils/activity/pgstat_wal.c | 2 +-
src/include/executor/instrument.h | 1 +
src/include/pgstat.h | 1 -
5 files changed, 5 insertions(+), 3 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Move wal_buffers_full from PgStat_PendingWalStats to WalUsage
In-Reply-To: <E1tjsYS-007XrG-Pw@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox