doc: Clarify meaning of "idle" in idle_replication_slot_timeout.
authorFujii Masao <fujii@postgresql.org>
Thu, 10 Jul 2025 23:44:32 +0000 (08:44 +0900)
committerFujii Masao <fujii@postgresql.org>
Thu, 10 Jul 2025 23:44:32 +0000 (08:44 +0900)
This commit updates the documentation to clarify that "idle" in
idle_replication_slot_timeout means the replication slot is inactive,
that is, not currently used by any replication connection.

Without this clarification, "idle" could be misinterpreted to mean
that the slot is not advancing or that no data is being streamed,
even if a connection exists.

Back-patch to v18 where idle_replication_slot_timeout was added.

Author: Laurenz Albe <laurenz.albe@cybertec.at>
Reviewed-by: David G. Johnston <david.g.johnston@gmail.com>
Reviewed-by: Gunnar Morling <gunnar.morling@googlemail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CADGJaX_0+FTguWpNSpgVWYQP_7MhoO0D8=cp4XozSQgaZ40Odw@mail.gmail.com
Backpatch-through: 18

doc/src/sgml/config.sgml
doc/src/sgml/system-views.sgml
src/backend/replication/slot.c

index bd12225cbe4f019c1a06ba4d83ce12d926a89a6a..c7acc0f182f3eafc3041c10c4def24e9160c26bf 100644 (file)
@@ -4618,10 +4618,12 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"'  # Windows
       </term>
       <listitem>
        <para>
-        Invalidate replication slots that have remained idle longer than this
-        duration. If this value is specified without units, it is taken as
-        seconds. A value of zero (the default) disables the idle timeout
-        invalidation mechanism. This parameter can only be set in the
+        Invalidate replication slots that have remained inactive (not used by
+        a <link linkend="protocol-replication">replication connection</link>)
+        for longer than this duration.
+        If this value is specified without units, it is taken as seconds.
+        A value of zero (the default) disables the idle timeout
+        invalidation mechanism.  This parameter can only be set in the
         <filename>postgresql.conf</filename> file or on the server command
         line.
        </para>
index d3ff8c35738573cc493ceb828c17a4717c7dce23..4187191ea7413483782f7630f62a8ba53c4eb343 100644 (file)
@@ -3003,7 +3003,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
         <listitem>
          <para>
           <literal>idle_timeout</literal> means that the slot has remained
-          idle longer than the configured
+          inactive longer than the configured
           <xref linkend="guc-idle-replication-slot-timeout"/> duration.
          </para>
         </listitem>
index c1c0f6c660d13a5ffc5ca449715b945f7e4999e2..281092279ac80439c3984cf007bc3f04defd2ae8 100644 (file)
@@ -1892,7 +1892,7 @@ InvalidatePossiblyObsoleteSlot(uint32 possible_causes,
         * max_slot_wal_keep_size is set to -1 and
         * idle_replication_slot_timeout is set to 0 during the binary
         * upgrade. See check_old_cluster_for_valid_slots() where we ensure
-        * that no invalidated before the upgrade.
+        * that no slot was invalidated before the upgrade.
         */
        Assert(!(*invalidated && SlotIsLogical(s) && IsBinaryUpgrade));