Add num_done counter to the pg_stat_checkpointer view.
Fujii Masao <fujii@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/monitoring.sgml | modified | +10 −1 |
| src/backend/access/transam/xlog.c | modified | +7 −2 |
| src/backend/catalog/system_views.sql | modified | +1 −0 |
| src/backend/postmaster/checkpointer.c | modified | +25 −14 |
| src/backend/utils/activity/pgstat_checkpointer.c | modified | +2 −0 |
| src/backend/utils/adt/pgstatfuncs.c | modified | +6 −0 |
| src/include/access/xlog.h | modified | +1 −1 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.dat | modified | +5 −0 |
| src/include/pgstat.h | modified | +1 −0 |
| src/test/regress/expected/rules.out | modified | +1 −0 |
Documentation touched
Discussion
- May be BUG. Periodic burst growth of the checkpoint_req counter on replica. 35 messages · 2022-09-06 → 2024-10-10