Home Explore Blog CI



postgresql

45th chunk of `doc/src/sgml/monitoring.sgml`
efd764426f51ceaa5b5d61ee3e8533f12d5f31173dab55060000000100000fab
 role="catalog_table_entry"><para role="column_definition">
       <structfield>confl_bufferpin</structfield> <type>bigint</type>
      </para>
      <para>
       Number of queries in this database that have been canceled due to
       pinned buffers
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>confl_deadlock</structfield> <type>bigint</type>
      </para>
      <para>
       Number of queries in this database that have been canceled due to
       deadlocks
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>confl_active_logicalslot</structfield> <type>bigint</type>
      </para>
      <para>
       Number of uses of logical slots in this database that have been
       canceled due to old snapshots or too low a <xref linkend="guc-wal-level"/>
       on the primary
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

 </sect2>

 <sect2 id="monitoring-pg-stat-all-tables-view">
  <title><structname>pg_stat_all_tables</structname></title>

  <indexterm>
   <primary>pg_stat_all_tables</primary>
  </indexterm>

  <para>
   The <structname>pg_stat_all_tables</structname> view will contain
   one row for each table in the current database (including TOAST
   tables), showing statistics about accesses to that specific table. The
   <structname>pg_stat_user_tables</structname> and
   <structname>pg_stat_sys_tables</structname> views
   contain the same information,
   but filtered to only show user and system tables respectively.
  </para>

  <table id="pg-stat-all-tables-view" xreflabel="pg_stat_all_tables">
   <title><structname>pg_stat_all_tables</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>relid</structfield> <type>oid</type>
      </para>
      <para>
       OID of a table
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>schemaname</structfield> <type>name</type>
      </para>
      <para>
       Name of the schema that this table is in
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relname</structfield> <type>name</type>
      </para>
      <para>
       Name of this table
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>seq_scan</structfield> <type>bigint</type>
      </para>
      <para>
       Number of sequential scans initiated on this table
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>last_seq_scan</structfield> <type>timestamp with time zone</type>
      </para>
      <para>
       The time of the last sequential scan on this table, based on the
       most recent transaction stop time
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>seq_tup_read</structfield> <type>bigint</type>
      </para>
      <para>
       Number of live rows fetched by sequential scans
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>idx_scan</structfield> <type>bigint</type>
      </para>
      <para>
       Number of index scans initiated on this table
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>last_idx_scan</structfield>

Title: pg_stat_all_tables View: Table Access Statistics
Summary
This section describes the `pg_stat_all_tables` view, which provides statistics about accesses to each table in the current database, including TOAST tables. The view contains information on `confl_bufferpin`, `confl_deadlock`, and `confl_active_logicalslot` for conflict resolution and also lists columns like `relid` (table OID), `schemaname`, `relname`, `seq_scan` (number of sequential scans), `last_seq_scan` (time of last sequential scan), `seq_tup_read` (number of live rows fetched), `idx_scan` (number of index scans).