summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFujii Masao2025-07-10 23:44:32 +0000
committerFujii Masao2025-07-10 23:45:56 +0000
commitafb64a56d9c13d0bcd32c00e9a4482106217ed96 (patch)
treec58317c2d7b7eb7efa417a103a6024f3e9eceaeb
parent37c76aeb9ae30f3fee6ee86f54344670c7099d9c (diff)
doc: Clarify meaning of "idle" in idle_replication_slot_timeout.
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 <[email protected]> Reviewed-by: David G. Johnston <[email protected]> Reviewed-by: Gunnar Morling <[email protected]> Reviewed-by: Amit Kapila <[email protected]> Reviewed-by: Fujii Masao <[email protected]> Discussion: https://postgr.es/m/CADGJaX_0+FTguWpNSpgVWYQP_7MhoO0D8=cp4XozSQgaZ40Odw@mail.gmail.com Backpatch-through: 18
-rw-r--r--doc/src/sgml/config.sgml10
-rw-r--r--doc/src/sgml/system-views.sgml2
-rw-r--r--src/backend/replication/slot.c2
3 files changed, 8 insertions, 6 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index bd12225cbe4..c7acc0f182f 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -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>
diff --git a/doc/src/sgml/system-views.sgml b/doc/src/sgml/system-views.sgml
index e1ac544ee40..d5ce93dd893 100644
--- a/doc/src/sgml/system-views.sgml
+++ b/doc/src/sgml/system-views.sgml
@@ -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>
diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index 27530dade2b..7faaafe1c41 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -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));