Improve documentation for pg_stat_checkpointer fields
authorAlexander Korotkov <[email protected]>
Thu, 14 Mar 2024 00:07:27 +0000 (02:07 +0200)
committerAlexander Korotkov <[email protected]>
Thu, 14 Mar 2024 00:17:59 +0000 (02:17 +0200)
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
src/include/catalog/pg_proc.dat

index 8aca08140ea79017d2d2c3c601d1dbbb14350db1..8736eac284199c45eb80f555541b983c5ef658a2 100644 (file)
@@ -3016,7 +3016,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage
       </para>
       <para>
        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
       </para></entry>
      </row>
 
@@ -3026,8 +3027,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage
       </para>
       <para>
        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
       </para></entry>
      </row>
 
@@ -3036,7 +3037,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
        <structfield>buffers_written</structfield> <type>bigint</type>
       </para>
       <para>
-       Number of buffers written during checkpoints
+       Number of buffers written during checkpoints and restartpoints
       </para></entry>
      </row>
 
index 291ed876fca40ad2e5f4e95eac16597af3421649..4af5c2e847018a5917fe805a9f40f117c468666e 100644 (file)
   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' },
   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' },