From d3a91da817b7470ed19d486daffc0bf3334f58f9 Mon Sep 17 00:00:00 2001 From: Fujii Masao Date: Thu, 10 Jul 2025 18:16:13 +0900 Subject: [PATCH v3 2/2] 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. Author: Laurenz Albe Reviewed-by: David G. Johnston Reviewed-by: Gunnar Morling Reviewed-by: Amit Kapila Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/CADGJaX_0+FTguWpNSpgVWYQP_7MhoO0D8=cp4XozSQgaZ40Odw@mail.gmail.com --- doc/src/sgml/config.sgml | 10 ++++++---- doc/src/sgml/system-views.sgml | 2 +- src/backend/replication/slot.c | 2 +- 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 - 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 replication connection) + 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 postgresql.conf file or on the server command line. diff --git a/doc/src/sgml/system-views.sgml b/doc/src/sgml/system-views.sgml index d3ff8c35738..4187191ea74 100644 --- a/doc/src/sgml/system-views.sgml +++ b/doc/src/sgml/system-views.sgml @@ -3003,7 +3003,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx idle_timeout means that the slot has remained - idle longer than the configured + inactive longer than the configured duration. diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c index c1c0f6c660d..281092279ac 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)); -- 2.49.0