Home Explore Blog CI



postgresql

37th chunk of `doc/src/sgml/monitoring.sgml`
d66b4baa407712f0f863b9a8007280f0efcda014d8e90c820000000100000fa3
 should be increased.
     </para>
    </listitem>
    <listitem>
     <para>
      Client backends rely on the checkpointer to ensure data is persisted to
      permanent storage. Large numbers of <varname>fsyncs</varname> by
      <literal>client backend</literal>s could indicate a misconfiguration of
      shared buffers or of the checkpointer. More information on configuring
      the checkpointer can be found in <xref linkend="wal-configuration"/>.
     </para>
    </listitem>
    <listitem>
     <para>
      Normally, client backends should be able to rely on auxiliary processes
      like the checkpointer and the background writer to write out dirty data
      as much as possible. Large numbers of writes by client backends could
      indicate a misconfiguration of shared buffers or of the checkpointer.
      More information on configuring the checkpointer can be found in <xref
      linkend="wal-configuration"/>.
     </para>
    </listitem>
   </itemizedlist>
  </para>

  <note>
   <para>
    Columns tracking I/O wait time will only be non-zero when
    <xref linkend="guc-track-io-timing"/> is enabled. The user should be
    careful when referencing these columns in combination with their
    corresponding I/O operations in case <varname>track_io_timing</varname>
    was not enabled for the entire time since the last stats reset.
   </para>
  </note>



 </sect2>

 <sect2 id="monitoring-pg-stat-bgwriter-view">
  <title><structname>pg_stat_bgwriter</structname></title>

  <indexterm>
   <primary>pg_stat_bgwriter</primary>
  </indexterm>

  <para>
   The <structname>pg_stat_bgwriter</structname> view will always have a
   single row, containing data about the background writer of the cluster.
  </para>

  <table id="pg-stat-bgwriter-view" xreflabel="pg_stat_bgwriter">
   <title><structname>pg_stat_bgwriter</structname> View</title>
   <tgroup cols="1">
    <thead>
     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       Column Type
      </para>
      <para>
       Description
      </para></entry>
     </row>
    </thead>

    <tbody>
     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>buffers_clean</structfield> <type>bigint</type>
      </para>
      <para>
       Number of buffers written by the background writer
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>maxwritten_clean</structfield> <type>bigint</type>
      </para>
      <para>
       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>buffers_alloc</structfield> <type>bigint</type>
      </para>
      <para>
       Number of buffers allocated
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
      </para>
      <para>
       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">
       Column Type
      </para>
      <para>
       Description
      </para></entry>

Title: Monitoring Background Writer and Checkpointer Statistics Views
Summary
This section details the `pg_stat_bgwriter` and `pg_stat_checkpointer` views, each containing a single row providing information about the background writer and checkpointer processes, respectively. It describes the columns in `pg_stat_bgwriter`, including `buffers_clean` (buffers written), `maxwritten_clean` (times cleaning scan stopped), `buffers_alloc` (buffers allocated), and `stats_reset` (last reset time). The subsequent section introduces the `pg_stat_checkpointer` view.