Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uUha7-007H5d-Ed for pgsql-docs@arkaria.postgresql.org; Thu, 26 Jun 2025 08:03:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uUha5-009WLy-In for pgsql-docs@arkaria.postgresql.org; Thu, 26 Jun 2025 08:03:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uUha5-009WLq-BF for pgsql-docs@lists.postgresql.org; Thu, 26 Jun 2025 08:03:37 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uUha4-0044JW-0M for pgsql-docs@lists.postgresql.org; Thu, 26 Jun 2025 08:03:37 +0000 Received: from [192.168.11.9] (p1696134-ipoe.ipoe.ocn.ne.jp [118.0.93.133]) by oss.nttdata.com (Postfix) with ESMTPSA id 700A861974; Thu, 26 Jun 2025 17:03:33 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: <938e2d16-4449-413b-a2fc-2595e732e3e1@oss.nttdata.com> Date: Thu, 26 Jun 2025 17:03:32 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Mention idle_replication_slot_timeout in pg_replication_slots docs Content-Language: en-US To: Nisha Moond Cc: pgsql-docs@lists.postgresql.org References: <78b34e84-2195-4f28-a151-5d204a382fdd@oss.nttdata.com> From: Fujii Masao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025/06/26 15:46, Nisha Moond wrote: > On Wed, Jun 25, 2025 at 9:56=E2=80=AFPM Fujii Masao wrote: >> >> Hi, >> >> The pg_replication_slots documentation mentions only max_slot_wal_keep= _size >> as a condition under which the wal_status column can show unreserved o= r lost. >> However, since commit ac0e33136ab, idle_replication_slot_timeout can a= lso >> cause this behavior when it is set. This has not been documented yet. >> https://www.postgresql.org/docs/devel/view-pg-replication-slots.html >> >=20 > +1 to the doc update. Thanks for the review! >> So, how about updating the documentation to also mention >> idle_replication_slot_timeout as a factor that can cause wal_status to >> become unreserved or lost? Patch attached. >> >=20 > Since idle_replication_slot_timeout can only cause wal_status to > become 'lost' and not 'unreserved', perhaps we can reword the sentence > slightly for clarity, suggestion - > "The last two states are seen when max_slot_wal_keep_size is > non-negative and, the 'lost' state may also appear when > idle_replication_slot_timeout is greater than zero." I was thinking that when idle_replication_slot_timeout triggers, the following functions are called, and that wal_status can become "unreserved" before ReplicationSlotRelease() runs. It's very short period, though. Am I wrong? ReplicationSlotMarkDirty(); ReplicationSlotSave(); ReplicationSlotRelease(); Regards, --=20 Fujii Masao NTT DATA Japan Corporation