Home Explore Blog CI



postgresql

33th chunk of `doc/src/sgml/monitoring.sgml`
24cd4b64ec87ba824c674ffe848af9cde4b4922e294a47f80000000100000fa0
 linkend="monitoring-pg-stat-activity-view">
        <structname>pg_stat_activity</structname></link> for more information
        on <varname>backend_type</varname>s. Some
        <varname>backend_type</varname>s do not accumulate I/O operation
        statistics and will not be included in the view.
       </para>
      </entry>
     </row>

     <row>
      <entry role="catalog_table_entry">
       <para role="column_definition">
        <structfield>object</structfield> <type>text</type>
       </para>
       <para>
        Target object of an I/O operation. Possible values are:
       <itemizedlist>
        <listitem>
         <para>
          <literal>relation</literal>: Permanent relations.
         </para>
        </listitem>
        <listitem>
         <para>
          <literal>temp relation</literal>: Temporary relations.
         </para>
        </listitem>
        <listitem>
         <para>
          <literal>wal</literal>: Write Ahead Logs.
         </para>
        </listitem>
       </itemizedlist>
       </para>
      </entry>
     </row>

     <row>
      <entry role="catalog_table_entry">
       <para role="column_definition">
        <structfield>context</structfield> <type>text</type>
       </para>
       <para>
        The context of an I/O operation. Possible values are:
       </para>
       <itemizedlist>
        <listitem>
         <para>
          <literal>normal</literal>: The default or standard
          <varname>context</varname> for a type of I/O operation. For
          example, by default, relation data is read into and written out from
          shared buffers. Thus, reads and writes of relation data to and from
          shared buffers are tracked in <varname>context</varname>
          <literal>normal</literal>.
         </para>
        </listitem>
        <listitem>
         <para>
          <literal>init</literal>: I/O operations performed while creating the
          WAL segments are tracked in <varname>context</varname>
          <literal>init</literal>.
         </para>
        </listitem>
        <listitem>
         <para>
          <literal>vacuum</literal>: I/O operations performed outside of shared
          buffers while vacuuming and analyzing permanent relations. Temporary
          table vacuums use the same local buffer pool as other temporary table
          I/O operations and are tracked in <varname>context</varname>
          <literal>normal</literal>.
         </para>
        </listitem>
        <listitem>
         <para>
          <literal>bulkread</literal>: Certain large read I/O operations
          done outside of shared buffers, for example, a sequential scan of a
          large table.
         </para>
        </listitem>
        <listitem>
         <para>
          <literal>bulkwrite</literal>: Certain large write I/O operations
          done outside of shared buffers, such as <command>COPY</command>.
         </para>
        </listitem>
       </itemizedlist>
      </entry>
     </row>

     <row>
      <entry role="catalog_table_entry">
       <para role="column_definition">
        <structfield>reads</structfield> <type>bigint</type>
       </para>
       <para>
        Number of read operations.
       </para>
      </entry>
     </row>

     <row>
      <entry role="catalog_table_entry">
       <para role="column_definition">
        <structfield>read_bytes</structfield> <type>numeric</type>
       </para>
       <para>
        The total size of read operations in bytes.
       </para>
      </entry>
     </row>

     <row>
      <entry role="catalog_table_entry">
       <para role="column_definition">
        <structfield>read_time</structfield> <type>double precision</type>
       </para>
       <para>
        Time spent waiting for read operations in milliseconds (if
        <xref linkend="guc-track-io-timing"/> is enabled and
        <varname>object</varname> is not <literal>wal</literal>,
        or if <xref linkend="guc-track-wal-io-timing"/> is enabled

Title: pg_stat_io View (Continued): Context, Reads, and Timing
Summary
This section continues the description of the `pg_stat_io` view columns, focusing on `context`, `reads`, `read_bytes`, and `read_time`. `context` describes the I/O operation's context, such as 'normal', 'init', 'vacuum', 'bulkread', and 'bulkwrite'. `reads` provides the number of read operations, while `read_bytes` details the total size of read operations in bytes. `read_time` records the time spent waiting for read operations in milliseconds, subject to the enabling of `track_io_timing` or `track_wal_io_timing`.