mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Add some instrumentation to the bgwriter, through the stats collector.
New view pg_stat_bgwriter, and the functions required to build it.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.47 2007/03/16 17:57:35 mha Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.48 2007/03/30 18:34:55 mha Exp $ -->
|
||||
|
||||
<chapter id="monitoring">
|
||||
<title>Monitoring Database Activity</title>
|
||||
@ -260,6 +260,16 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structname>pg_stat_bgwriter</></entry>
|
||||
<entry>One row only, showing cluster-wide statistics from the
|
||||
background writer: number of scheduled checkpoints, requested
|
||||
checkpoints, buffers written by checkpoints, lru-scans and all-scans,
|
||||
and the number of times the bgwriter aborted a round because it had
|
||||
written too many buffers during lru-scans and all-scans.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structname>pg_stat_database</></entry>
|
||||
<entry>One row per database, showing database OID, database name,
|
||||
@ -751,6 +761,71 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal><function>pg_stat_get_bgwriter_timed_checkpoints</function>()</literal></entry>
|
||||
<entry><type>bigint</type></entry>
|
||||
<entry>
|
||||
The number of times the bgwriter has started timed checkpoints
|
||||
(because the <varname>checkpoint_timeout</varname> time has expired).
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal><function>pg_stat_get_bgwriter_requested_checkpoints</function>()</literal></entry>
|
||||
<entry><type>bigint</type></entry>
|
||||
<entry>
|
||||
The number of times the bgwriter has started checkpoints based on
|
||||
requests from backends because the <varname>checkpoint_segments</varname>
|
||||
has been exceeded or because the CHECKPOINT command has been issued.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal><function>pg_stat_get_bgwriter_buf_written_checkpoints</function>()</literal></entry>
|
||||
<entry><type>bigint</type></entry>
|
||||
<entry>
|
||||
The number of buffers written by the bgwriter during checkpoints.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal><function>pg_stat_get_bgwriter_buf_written_lru</function>()</literal></entry>
|
||||
<entry><type>bigint</type></entry>
|
||||
<entry>
|
||||
The number of buffers written by the bgwriter when performing a
|
||||
LRU scan of the buffer cache.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal><function>pg_stat_get_bgwriter_buf_written_all</function>()</literal></entry>
|
||||
<entry><type>bigint</type></entry>
|
||||
<entry>
|
||||
The number of buffers written by the bgwriter when performing a
|
||||
scan of all the buffer cache.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal><function>pg_stat_get_bgwriter_maxwritten_lru</function>()</literal></entry>
|
||||
<entry><type>bigint</type></entry>
|
||||
<entry>
|
||||
The number of times the bgwriter has stopped its LRU round because
|
||||
it has written more buffers than specified in the
|
||||
<varname>bgwriter_lru_maxpages</varname> parameter.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal><function>pg_stat_get_bgwriter_maxwritten_all</function>()</literal></entry>
|
||||
<entry><type>bigint</type></entry>
|
||||
<entry>
|
||||
The number of times the bgwriter has stopped its all-buffer round
|
||||
because it has written more buffers than specified in the
|
||||
<varname>bgwriter_all_maxpages</varname> parameter.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal><function>pg_stat_clear_snapshot</function>()</literal></entry>
|
||||
<entry><type>void</type></entry>
|
||||
|
Reference in New Issue
Block a user