Re: Unexpected behavior when setting "idle_replication_slot_timeout"
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>,
Nisha Moond <nisha.moond412@gmail.com>, Gunnar Morling <gunnar.morling@googlemail.com>,
pgsql-bugs@lists.postgresql.org
Date: 2025-07-05T04:06:25Z
Lists: pgsql-bugs
On Fri, Jul 4, 2025 at 9:54 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote: > > On 2025/07/05 1:07, Laurenz Albe wrote: > > On Sat, 2025-07-05 at 00:22 +0900, Fujii Masao wrote: > >> On 2025/07/04 23:12, Fujii Masao wrote: > >>> But I wonder why the current unit of this GUC is minutes (GUC_UNIT_MIN). > >>> Since at least two users (including myself) tried to set it to a value > >>> less than 1 minute, it might worth considering changing the unit to seconds > >>> (GUC_UNIT_S). Also which would reduces the chance of the reported trouble. > >> > >> Attached patch changes unit of idle_replication_slot_timeout to seconds. > > > > -1 > > > > I think that the reason that several users tried to set it it less than a minute > > is that they were trying to test the feature and didn't want to wait long. > > I cannot imagine that anybody will want to abandon a standby server just > > because it is idle for more than 30 seconds. > > Maybe. But changing the unit to seconds doesn't make things worse, does it? > It still allows users to set values greater than 1 minute, and also less than > 1 minute for debugging or testing purposes, if needed. > We expect the value of this variable to be in hours or, in some cases, days. Specifying in seconds would be inconvenient for users. Now, I agree there is a value in testing/debugging to allow it to be seconds, but the same could be said for other variables whose units are in minutes, like log_rotation_age and wal_summary_keep_time. > Or are you suggesting we should disallow values below 1 minute? > We should be consistent with other similar GUC variables whose unit is in GUC_UNIT_MIN. -- With Regards, Amit Kapila.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
doc: Clarify meaning of "idle" in idle_replication_slot_timeout.
- afb64a56d9c1 18.0 landed
- 110e6dcaa659 19 (unreleased) landed
-
Change unit of idle_replication_slot_timeout to seconds.
- 37c76aeb9ae3 18.0 landed
- 05dedf43d380 19 (unreleased) landed