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>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Nisha Moond <nisha.moond412@gmail.com>
Cc: Gunnar Morling <gunnar.morling@googlemail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: Unexpected behavior when setting "idle_replication_slot_timeout"
Date: Sat, 05 Jul 2025 11:56:48 -0400
Message-ID: <472687.1751731008@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwYVEgy+fiHMvSoykiEef-VF-ZV9Gxv4rynk9NNK9UMPYQ@mail.gmail.com>
References: <CADGJaX_0+FTguWpNSpgVWYQP_7MhoO0D8=cp4XozSQgaZ40Odw@mail.gmail.com>
<CABdArM76e8-XChodqKxEiRK3tR_Yv3cymn_AWfP4bOsLDscZAg@mail.gmail.com>
<30e91649-06dd-453e-8658-5f4acd03a3bd@oss.nttdata.com>
<b26f13d7-769a-4b64-8bed-cb3a833c0604@oss.nttdata.com>
<686577f2379e4b978803e72746dcf0dd7baf3937.camel@cybertec.at>
<e0789f10-5b48-4d6b-a32c-0f4426d254df@oss.nttdata.com>
<CAA4eK1LOyUeCHk3hMtjT-bpqXLAnjODwcO+o7+bTnB2es-fSqw@mail.gmail.com>
<70b183fb-f66e-40d8-b0de-be8c1052fa93@oss.nttdata.com>
<CAKFQuwYVEgy+fiHMvSoykiEef-VF-ZV9Gxv4rynk9NNK9UMPYQ@mail.gmail.com>
"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
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, masao.fujii@oss.nttdata.com, amit.kapila16@gmail.com, laurenz.albe@cybertec.at, nisha.moond412@gmail.com, gunnar.morling@googlemail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: Unexpected behavior when setting "idle_replication_slot_timeout"
In-Reply-To: <472687.1751731008@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox