Re: Unexpected behavior when setting "idle_replication_slot_timeout"
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Tom Lane <tgl@sss.pgh.pa.us>,
"David G. Johnston" <david.g.johnston@gmail.com>, Fujii Masao <masao.fujii@oss.nttdata.com>,
Nisha Moond <nisha.moond412@gmail.com>, Gunnar Morling <gunnar.morling@googlemail.com>, "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2025-07-09T06:35:00Z
Lists: pgsql-bugs
On Tue, Jul 8, 2025 at 10:23 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
>
> On Sat, 2025-07-05 at 12:13 -0400, Tom Lane wrote:
> > Oh, wait a second. I just noticed that this variable is new in v18.
> > So there won't be a compatibility issue as long as we change it in
> > v18 too. So changing it to a base of seconds seems sufficient,
> > and more in line with existing practice:
> >
> > Using 'ms' seems clearly overkill, but there's precedent for
> > timeouts measured in seconds.
>
> Here is a patch that changes the unit to seconds, like Fujii Masao's
> patch upthread. In addition, it removes the now unnecessary injection
> point for the TAP test and tries to improve the documentation to
> address my complaints.
>
+# Wait a bit for the replication slots to become invalid
+$node->safe_psql('postgres', "SELECT pg_sleep(2)");
Is it a good idea to add 2s to 'make check-world' for one particular test?
--
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