From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Introduce pg_stat_checkpointer
Date: Mon, 30 Oct 2023 00:47:56 +0000
Message-ID: <E1qxGRf-0031eB-Ko@gemulon.postgresql.org> (raw)
Introduce pg_stat_checkpointer
Historically, the statistics of the checkpointer have been always part
of pg_stat_bgwriter. This commit removes a few columns from
pg_stat_bgwriter, and introduces pg_stat_checkpointer with equivalent,
renamed columns (plus a new one for the reset timestamp):
- checkpoints_timed -> num_timed
- checkpoints_req -> num_requested
- checkpoint_write_time -> write_time
- checkpoint_sync_time -> sync_time
- buffers_checkpoint -> buffers_written
The fields of PgStat_CheckpointerStats and its SQL functions are renamed
to match with the new field names, for consistency. Note that
background writer and checkpointer have been split into two different
processes in commits 806a2aee3791 and bf405ba8e460. The pgstat
structures were already split, making this change straight-forward.
Bump catalog version.
Author: Bharath Rupireddy
Reviewed-by: Bertrand Drouvot, Andres Freund, Michael Paquier
Discussion: https://postgr.es/m/CALj2ACVxX2ii=66RypXRweZe2EsBRiPMj0aHfRfHUeXJcC7kHg@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/96f052613f35d07d001c8dd2f284ca8d95f82d1b
Modified Files
--------------
doc/src/sgml/monitoring.sgml | 98 ++++++++++++++++++------
src/backend/access/transam/xlog.c | 4 +-
src/backend/catalog/system_views.sql | 14 ++--
src/backend/postmaster/checkpointer.c | 6 +-
src/backend/storage/buffer/bufmgr.c | 2 +-
src/backend/utils/activity/pgstat_checkpointer.c | 21 ++---
src/backend/utils/adt/pgstatfuncs.c | 35 +++++----
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 30 ++++----
src/include/pgstat.h | 11 +--
src/test/recovery/t/029_stats_restart.pl | 6 +-
src/test/regress/expected/rules.out | 13 ++--
src/test/regress/expected/stats.out | 27 ++++++-
src/test/regress/sql/stats.sql | 13 +++-
14 files changed, 187 insertions(+), 95 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: Introduce pg_stat_checkpointer
In-Reply-To: <E1qxGRf-0031eB-Ko@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