]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
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:45:56 +0000 (08:45 +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 e1ac544ee4079de5e721d59e8a423b5873314cc4..d5ce93dd8935468b921a125638ce17660b0ee778 100644 (file)
@@ -2929,7 +2929,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 27530dade2b2f32262f7513074d098913528363b..7faaafe1c411f0fe0bf23cfb765a2ac795f5676d 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));