Enhance checkpointer restartpoint statistics
authorAlexander Korotkov <[email protected]>
Sun, 24 Dec 2023 22:52:42 +0000 (00:52 +0200)
committerAlexander Korotkov <[email protected]>
Sun, 24 Dec 2023 23:12:36 +0000 (01:12 +0200)
commit12915a58eec962f407a6c38ce2bf08a48dde57b5
tree157866d53bed7766c4bb41ee7be37b0cc4579fb7
parent64e77b496af61ee31189ba69b40e785e11e9967f
Enhance checkpointer restartpoint statistics

Bhis commit introduces enhancements to the pg_stat_checkpointer view by adding
three new columns: restartpoints_timed, restartpoints_req, and
restartpoints_done. These additions aim to improve the visibility and
monitoring of restartpoint processes on replicas.

Previously, it was challenging to differentiate between successful and failed
restartpoint requests. This limitation arises because restartpoints on replicas
are dependent on checkpoint records from the primary, and cannot occur more
frequently than these checkpoints.

The new columns allow for clear distinction and tracking of restartpoint
requests, their triggers, and successful completions.  This enhancement aids
database administrators and developers in better understanding and diagnosing
issues related to restartpoint behavior, particularly in scenarios where
restartpoint requests may fail.

System catalog is changed.  Catversion is bumped.

Discussion: https://postgr.es/m/99b2ccd1-a77a-962a-0837-191cdf56c2b9%40inbox.ru
Author: Anton A. Melnikov
Reviewed-by: Kyotaro Horiguchi, Alexander Korotkov
doc/src/sgml/monitoring.sgml
doc/src/sgml/wal.sgml
src/backend/catalog/system_views.sql
src/backend/postmaster/checkpointer.c
src/backend/utils/activity/pgstat_checkpointer.c
src/backend/utils/adt/pgstatfuncs.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.dat
src/include/pgstat.h
src/test/regress/expected/rules.out