Hi,

The document explains that restart_lsn column in pg_replication_slots view is:

    The address (LSN) of oldest WAL which still might be required by
    the consumer of this slot and thus won't be automatically removed
    during checkpoints.

But the latter part is not true in v13 thanks to max_slot_wal_keep_size.
I think that we need to update it as follows. Thought?

    The address (LSN) 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
    max_slot_wal_keep_size from the current LSN.

Patch attached.

Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 700271fd40..bf326cf533 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -11214,7 +11214,9 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts 
ppx
       <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.  <literal>NULL</literal>
+       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>

Reply via email to