Re: Unexpected behavior when setting "idle_replication_slot_timeout"
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>,
Amit Kapila <amit.kapila16@gmail.com>,
Laurenz Albe <laurenz.albe@cybertec.at>,
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-05T15:56:48Z
Lists: pgsql-bugs
"David G. Johnston" <david.g.johnston@gmail.com> writes: > On Saturday, July 5, 2025, Fujii Masao <masao.fujii@oss.nttdata.com> wrote: >> Do you see any serious downside to switching the unit to seconds? I don't >> think it introduces any serious issues. On the contrary, it gives users >> finer >> control over the timeout, and additionally works around the issue >> that we're discussing here. > I do not, and would rather we make the change. Minutes are an > unconventional base unit for time in our world and should be avoided. By my count, there are ten GUCs declared with GUC_UNIT_S and three with GUC_UNIT_MIN. I'd say that there may be some lean towards seconds but David's argument seems like pure hyperbole. I'm kind of down on changing the unit, because it will *silently* break configuration files where the value was set without a unit. May I suggest an alternative? We could change the variable from int to float type and continue to specify it in minutes. That will have exactly zero compatibility impact, it allows sub-minute values to be selected at need, and it removes the need for hair-splitting documentation about what the rounding rules are. We previously did the same with vacuum_cost_delay to avoid worries about how to specify sub-millisecond precision for that. So the infrastructure is already in place, I think. The patch will be different from what is proposed but should need to touch pretty much the same places. regards, tom lane
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