Home Explore Blog CI



postgresql

31th chunk of `doc/src/sgml/system-views.sgml`
1f83fcfdd5fcd3a00ea69403c34511173276575a1044b4f20000000100000fa0
 remove catalog tuples deleted by any later transaction.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>restart_lsn</structfield> <type>pg_lsn</type>
      </para>
      <para>
       The address (<literal>LSN</literal>) of oldest WAL which still
       might be required by the consumer of this slot and thus won't be
       automatically removed during checkpoints unless this LSN
       gets behind more than <xref linkend="guc-max-slot-wal-keep-size"/>
       from the current LSN.  <literal>NULL</literal>
       if the <literal>LSN</literal> of this slot has never been reserved.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>confirmed_flush_lsn</structfield> <type>pg_lsn</type>
      </para>
      <para>
       The address (<literal>LSN</literal>) up to which the logical
       slot's consumer has confirmed receiving data. Data corresponding to the
       transactions committed before this <literal>LSN</literal> is not
       available anymore. <literal>NULL</literal> for physical slots.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>wal_status</structfield> <type>text</type>
      </para>
      <para>
       Availability of WAL files claimed by this slot.
       Possible values are:
       <itemizedlist>
        <listitem>
         <para><literal>reserved</literal> means that the claimed files
          are within <varname>max_wal_size</varname>.</para>
        </listitem>
        <listitem>
         <para><literal>extended</literal> means
          that <varname>max_wal_size</varname> is exceeded but the files are
          still retained, either by the replication slot or
          by <varname>wal_keep_size</varname>.
         </para>
        </listitem>
        <listitem>
         <para>
          <literal>unreserved</literal> means that the slot no longer
          retains the required WAL files and some of them are to be removed at
          the next checkpoint.  This state can return
          to <literal>reserved</literal> or <literal>extended</literal>.
         </para>
        </listitem>
        <listitem>
         <para>
          <literal>lost</literal> means that some required WAL files have
          been removed and this slot is no longer usable.
         </para>
        </listitem>
       </itemizedlist>
       The last two states are seen only when
       <xref linkend="guc-max-slot-wal-keep-size"/> is
       non-negative. If <structfield>restart_lsn</structfield> is NULL, this
       field is null.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>safe_wal_size</structfield> <type>int8</type>
      </para>
      <para>
       The number of bytes that can be written to WAL such that this slot
       is not in danger of getting in state "lost".  It is NULL for lost
       slots, as well as if <varname>max_slot_wal_keep_size</varname>
       is <literal>-1</literal>.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>two_phase</structfield> <type>bool</type>
      </para>
      <para>
       True if the slot is enabled for decoding prepared transactions.  Always
       false for physical slots.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>two_phase_at</structfield> <type>pg_lsn</type>
      </para>
      <para>
       The address (<literal>LSN</literal>) from which the decoding of prepared
       transactions is enabled. <literal>NULL</literal> for logical slots
       where <structfield>two_phase</structfield> is false and for physical slots.
      </para></entry>
     </row>

  

Title: Additional Replication Slot Columns
Summary
This section describes additional columns in the replication slot view, including restart LSN, confirmed flush LSN, WAL status, safe WAL size, and two-phase transaction settings, providing more details about the state and behavior of replication slots in a PostgreSQL database cluster.