From e820db5b56b20c68bce2956f8f6c8ba6bfff5735 Mon Sep 17 00:00:00 2001 From: Alexander Korotkov Date: Thu, 14 Mar 2024 02:07:27 +0200 Subject: [PATCH] Improve documentation for pg_stat_checkpointer fields pg_stat_checkpointer contains statistics for checkpoints and restartpoints. Before 12915a58eec9 documentation said only about checkpoints implying that restartpoint is the variation of checkpoint. 12915a58eec9 introduced new separate statistics fields for restartpoints. This commit explicitly documents fields that are relevant for both checkpoints and restartpoints. Reported-by: Magnus Hagander Discussion: https://postgr.es/m/CABUevExav5-SR0x%2BG9kBUMV0G8XsvSUfuyyqmYBBJi6VHns6sw%40mail.gmail.com Reviewed-by: Anton A. Melnikov --- doc/src/sgml/monitoring.sgml | 9 +++++---- src/include/catalog/pg_proc.dat | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 8aca08140e..8736eac284 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -3016,7 +3016,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage Total amount of time that has been spent in the portion of - checkpoint processing where files are written to disk, in milliseconds + processing checkpoints and restartpoints where files are written to disk, + in milliseconds @@ -3026,8 +3027,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage Total amount of time that has been spent in the portion of - checkpoint processing where files are synchronized to disk, in - milliseconds + processing checkpoints and restartpoints where files are synchronized to + disk, in milliseconds @@ -3036,7 +3037,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage buffers_written bigint - Number of buffers written during checkpoints + Number of buffers written during checkpoints and restartpoints diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index 291ed876fc..4af5c2e847 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -5737,7 +5737,7 @@ proparallel => 'r', prorettype => 'int8', proargtypes => '', prosrc => 'pg_stat_get_checkpointer_restartpoints_performed' }, { oid => '2771', - descr => 'statistics: number of buffers written by the checkpointer', + descr => 'statistics: number of buffers written during checkpoints and restartpoints', proname => 'pg_stat_get_checkpointer_buffers_written', provolatile => 's', proparallel => 'r', prorettype => 'int8', proargtypes => '', prosrc => 'pg_stat_get_checkpointer_buffers_written' }, @@ -5760,12 +5760,12 @@ proparallel => 'r', prorettype => 'timestamptz', proargtypes => '', prosrc => 'pg_stat_get_bgwriter_stat_reset_time' }, { oid => '3160', - descr => 'statistics: checkpoint time spent writing buffers to disk, in milliseconds', + descr => 'statistics: checkpoint/restartpoint time spent writing buffers to disk, in milliseconds', proname => 'pg_stat_get_checkpointer_write_time', provolatile => 's', proparallel => 'r', prorettype => 'float8', proargtypes => '', prosrc => 'pg_stat_get_checkpointer_write_time' }, { oid => '3161', - descr => 'statistics: checkpoint time spent synchronizing buffers to disk, in milliseconds', + descr => 'statistics: checkpoint/restartpoint time spent synchronizing buffers to disk, in milliseconds', proname => 'pg_stat_get_checkpointer_sync_time', provolatile => 's', proparallel => 'r', prorettype => 'float8', proargtypes => '', prosrc => 'pg_stat_get_checkpointer_sync_time' },