pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add num_done counter to the pg_stat_checkpointer view.
Date: Mon, 30 Sep 2024 03:15:52 +0000
Message-ID: <E1sv6t5-001VuH-JQ@gemulon.postgresql.org> (raw)

Add num_done counter to the pg_stat_checkpointer view.

Checkpoints can be skipped when the server is idle. The existing num_timed and
num_requested counters in pg_stat_checkpointer track both completed and
skipped checkpoints, but there was no way to count only the completed ones.

This commit introduces the num_done counter, which tracks only completed
checkpoints, making it easier to see how many were actually performed.

Bump catalog version.

Author: Anton A. Melnikov
Reviewed-by: Fujii Masao
Discussion: https://postgr.es/m/9ea77f40-818d-4841-9dee-158ac8f6e690@oss.nttdata.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/559efce1d684069acf234a5cb032acba84e70938

Modified Files
--------------
doc/src/sgml/monitoring.sgml                     | 11 ++++++-
src/backend/access/transam/xlog.c                |  9 ++++--
src/backend/catalog/system_views.sql             |  1 +
src/backend/postmaster/checkpointer.c            | 39 +++++++++++++++---------
src/backend/utils/activity/pgstat_checkpointer.c |  2 ++
src/backend/utils/adt/pgstatfuncs.c              |  6 ++++
src/include/access/xlog.h                        |  2 +-
src/include/catalog/catversion.h                 |  2 +-
src/include/catalog/pg_proc.dat                  |  5 +++
src/include/pgstat.h                             |  1 +
src/test/regress/expected/rules.out              |  1 +
11 files changed, 60 insertions(+), 19 deletions(-)



Message-ID: <E1sv6t5-001VuH-JQ@gemulon.postgresql.org>
Permalink:  ../E1sv6t5-001VuH-JQ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sv6t5-001VuH-JQ@gemulon.postgresql.org

 · 

reply

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: fujii@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add num_done counter to the pg_stat_checkpointer view.
  In-Reply-To: <E1sv6t5-001VuH-JQ@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