aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-10-30 09:47:16 +0900
committerMichael Paquier <michael@paquier.xyz>2023-10-30 09:47:16 +0900
commit96f052613f35d07d001c8dd2f284ca8d95f82d1b (patch)
tree5a685b8ab234dda0862c915fd4526f39f09c9d39 /doc/src
parentbf01e1ba963aed17449c70fed03c4ae74cce3926 (diff)
downloadpostgresql-96f052613f35d07d001c8dd2f284ca8d95f82d1b.tar.gz
postgresql-96f052613f35d07d001c8dd2f284ca8d95f82d1b.zip
Introduce pg_stat_checkpointer
Historically, the statistics of the checkpointer have been always part of pg_stat_bgwriter. This commit removes a few columns from pg_stat_bgwriter, and introduces pg_stat_checkpointer with equivalent, renamed columns (plus a new one for the reset timestamp): - checkpoints_timed -> num_timed - checkpoints_req -> num_requested - checkpoint_write_time -> write_time - checkpoint_sync_time -> sync_time - buffers_checkpoint -> buffers_written The fields of PgStat_CheckpointerStats and its SQL functions are renamed to match with the new field names, for consistency. Note that background writer and checkpointer have been split into two different processes in commits 806a2aee3791 and bf405ba8e460. The pgstat structures were already split, making this change straight-forward. Bump catalog version. Author: Bharath Rupireddy Reviewed-by: Bertrand Drouvot, Andres Freund, Michael Paquier Discussion: https://postgr.es/m/CALj2ACVxX2ii=66RypXRweZe2EsBRiPMj0aHfRfHUeXJcC7kHg@mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/monitoring.sgml98
1 files changed, 75 insertions, 23 deletions
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index faf7a5ed9d5..e068f7e2475 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -452,6 +452,15 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
</row>
<row>
+ <entry><structname>pg_stat_checkpointer</structname><indexterm><primary>pg_stat_checkpointer</primary></indexterm></entry>
+ <entry>One row only, showing statistics about the
+ checkpointer process's activity. See
+ <link linkend="monitoring-pg-stat-checkpointer-view">
+ <structname>pg_stat_checkpointer</structname></link> for details.
+ </entry>
+ </row>
+
+ <row>
<entry><structname>pg_stat_database</structname><indexterm><primary>pg_stat_database</primary></indexterm></entry>
<entry>One row per database, showing database-wide statistics. See
<link linkend="monitoring-pg-stat-database-view">
@@ -2868,7 +2877,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
<para>
The <structname>pg_stat_bgwriter</structname> view will always have a
- single row, containing global data for the cluster.
+ single row, containing data about the background writer of the cluster.
</para>
<table id="pg-stat-bgwriter-view" xreflabel="pg_stat_bgwriter">
@@ -2888,77 +2897,118 @@ description | Waiting for a newly initialized WAL file to reach durable storage
<tbody>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
- <structfield>checkpoints_timed</structfield> <type>bigint</type>
+ <structfield>buffers_clean</structfield> <type>bigint</type>
</para>
<para>
- Number of scheduled checkpoints that have been performed
+ Number of buffers written by the background writer
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
- <structfield>checkpoints_req</structfield> <type>bigint</type>
+ <structfield>maxwritten_clean</structfield> <type>bigint</type>
</para>
<para>
- Number of requested checkpoints that have been performed
+ Number of times the background writer stopped a cleaning
+ scan because it had written too many buffers
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
- <structfield>checkpoint_write_time</structfield> <type>double precision</type>
+ <structfield>buffers_alloc</structfield> <type>bigint</type>
</para>
<para>
- Total amount of time that has been spent in the portion of
- checkpoint processing where files are written to disk, in milliseconds
+ Number of buffers allocated
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
- <structfield>checkpoint_sync_time</structfield> <type>double precision</type>
+ <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
</para>
<para>
- Total amount of time that has been spent in the portion of
- checkpoint processing where files are synchronized to disk, in
- milliseconds
+ Time at which these statistics were last reset
</para></entry>
</row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </sect2>
+
+ <sect2 id="monitoring-pg-stat-checkpointer-view">
+ <title><structname>pg_stat_checkpointer</structname></title>
+ <indexterm>
+ <primary>pg_stat_checkpointer</primary>
+ </indexterm>
+
+ <para>
+ The <structname>pg_stat_checkpointer</structname> view will always have a
+ single row, containing data about the checkpointer process of the cluster.
+ </para>
+
+ <table id="pg-stat-checkpointer-view" xreflabel="pg_stat_checkpointer">
+ <title><structname>pg_stat_checkpointer</structname> View</title>
+ <tgroup cols="1">
+ <thead>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
- <structfield>buffers_checkpoint</structfield> <type>bigint</type>
+ Column Type
</para>
<para>
- Number of buffers written during checkpoints
+ Description
</para></entry>
</row>
+ </thead>
+ <tbody>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
- <structfield>buffers_clean</structfield> <type>bigint</type>
+ <structfield>num_timed</structfield> <type>bigint</type>
</para>
<para>
- Number of buffers written by the background writer
+ Number of scheduled checkpoints that have been performed
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
- <structfield>maxwritten_clean</structfield> <type>bigint</type>
+ <structfield>num_requested</structfield> <type>bigint</type>
</para>
<para>
- Number of times the background writer stopped a cleaning
- scan because it had written too many buffers
+ Number of requested checkpoints that have been performed
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
- <structfield>buffers_alloc</structfield> <type>bigint</type>
+ <structfield>write_time</structfield> <type>double precision</type>
</para>
<para>
- Number of buffers allocated
+ Total amount of time that has been spent in the portion of
+ checkpoint processing where files are written to disk, in milliseconds
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ <structfield>sync_time</structfield> <type>double precision</type>
+ </para>
+ <para>
+ Total amount of time that has been spent in the portion of
+ checkpoint processing where files are synchronized to disk, in
+ milliseconds
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ <structfield>buffers_written</structfield> <type>bigint</type>
+ </para>
+ <para>
+ Number of buffers written during checkpoints
</para></entry>
</row>
@@ -4669,8 +4719,10 @@ description | Waiting for a newly initialized WAL file to reach durable storage
Resets some cluster-wide statistics counters to zero, depending on the
argument. The argument can be <literal>bgwriter</literal> to reset
all the counters shown in
- the <structname>pg_stat_bgwriter</structname>
- view, <literal>archiver</literal> to reset all the counters shown in
+ the <structname>pg_stat_bgwriter</structname> view,
+ <literal>checkpointer</literal> to reset all the counters shown in
+ the <structname>pg_stat_checkpointer</structname> view,
+ <literal>archiver</literal> to reset all the counters shown in
the <structname>pg_stat_archiver</structname> view,
<literal>io</literal> to reset all the counters shown in the
<structname>pg_stat_io</structname> view,