agora inbox for pgsql-docs@postgresql.org
help / color / mirror / Atom feedFrom: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Nisha Moond <nisha.moond412@gmail.com>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Mention idle_replication_slot_timeout in pg_replication_slots docs
Date: Thu, 26 Jun 2025 17:03:32 +0900
Message-ID: <938e2d16-4449-413b-a2fc-2595e732e3e1@oss.nttdata.com> (raw)
In-Reply-To: <CABdArM5r8wD8w1dTMh+ozXZw5TbiWRYHzrc2tCy6PNOsffHvLA@mail.gmail.com>
References: <78b34e84-2195-4f28-a151-5d204a382fdd@oss.nttdata.com>
<CABdArM5r8wD8w1dTMh+ozXZw5TbiWRYHzrc2tCy6PNOsffHvLA@mail.gmail.com>
On 2025/06/26 15:46, Nisha Moond wrote:
> On Wed, Jun 25, 2025 at 9:56 PM Fujii Masao <masao.fujii@oss.nttdata.com> 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 or lost.
>> However, since commit ac0e33136ab, idle_replication_slot_timeout can also
>> cause this behavior when it is set. This has not been documented yet.
>> https://www.postgresql.org/docs/devel/view-pg-replication-slots.html
>>
>
> +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.
>>
>
> 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,
--
Fujii Masao
NTT DATA Japan Corporation
view thread (13+ messages) latest in thread
Message-ID: <938e2d16-4449-413b-a2fc-2595e732e3e1@oss.nttdata.com>
Permalink: ../938e2d16-4449-413b-a2fc-2595e732e3e1@oss.nttdata.com/
Also on: postgresql.org/message-id/938e2d16-4449-413b-a2fc-2595e732e3e1@oss.nttdata.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: masao.fujii@oss.nttdata.com, nisha.moond412@gmail.com, pgsql-docs@lists.postgresql.org
Subject: Re: Mention idle_replication_slot_timeout in pg_replication_slots docs
In-Reply-To: <938e2d16-4449-413b-a2fc-2595e732e3e1@oss.nttdata.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox