Home Explore Blog CI



postgresql

27th chunk of `doc/src/sgml/monitoring.sgml`
1364f69e9cab850eab8547527def0e9d9f285b6d75c1f6560000000100000fa0
 </para>
      <para>
       Last write-ahead log location received, the initial value of
       this field being 0; NULL for parallel apply workers
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>last_msg_send_time</structfield> <type>timestamp with time zone</type>
      </para>
      <para>
       Send time of last message received from origin WAL sender; NULL for
       parallel apply workers
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>last_msg_receipt_time</structfield> <type>timestamp with time zone</type>
      </para>
      <para>
       Receipt time of last message received from origin WAL sender; NULL for
       parallel apply workers
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>latest_end_lsn</structfield> <type>pg_lsn</type>
      </para>
      <para>
       Last write-ahead log location reported to origin WAL sender; NULL for
       parallel apply workers
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>latest_end_time</structfield> <type>timestamp with time zone</type>
      </para>
      <para>
       Time of last write-ahead log location reported to origin WAL
       sender; NULL for parallel apply workers
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

 </sect2>

 <sect2 id="monitoring-pg-stat-subscription-stats">
  <title><structname>pg_stat_subscription_stats</structname></title>

  <indexterm>
   <primary>pg_stat_subscription_stats</primary>
  </indexterm>

  <para>
   The <structname>pg_stat_subscription_stats</structname> view will contain
   one row per subscription.
  </para>

  <table id="pg-stat-subscription-stats" xreflabel="pg_stat_subscription_stats">
   <title><structname>pg_stat_subscription_stats</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>subid</structfield> <type>oid</type>
      </para>
      <para>
       OID of the subscription
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>subname</structfield> <type>name</type>
      </para>
      <para>
       Name of the subscription
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>apply_error_count</structfield> <type>bigint</type>
      </para>
      <para>
       Number of times an error occurred while applying changes. Note that any
       conflict resulting in an apply error will be counted in both
       <literal>apply_error_count</literal> and the corresponding conflict
       count (e.g., <literal>confl_*</literal>).
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>sync_error_count</structfield> <type>bigint</type>
      </para>
      <para>
       Number of times an error occurred during the initial table
       synchronization
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>confl_insert_exists</structfield> <type>bigint</type>
      </para>
      <para>
       Number of times a row insertion violated a
       <literal>NOT DEFERRABLE</literal> unique constraint during the
       application of changes. See <xref linkend="conflict-insert-exists"/>
       for details about this conflict.
    

Title: pg_stat_subscription_stats View Columns Explained
Summary
This section describes the remaining columns of the `pg_stat_subscription` view, focusing on the last WAL locations and times reported to the origin. It then introduces the `pg_stat_subscription_stats` view, which contains one row per subscription and provides statistics on apply and sync errors, as well as conflict counts during the application of changes. Columns include `subid`, `subname`, `apply_error_count`, `sync_error_count`, and `confl_insert_exists`.