From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Gunnar Morling <gunnar(dot)morling(at)googlemail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Unexpected behavior when setting "idle_replication_slot_timeout" |
Date: | 2025-07-05 15:56:48 |
Message-ID: | 472687.1751731008@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Saturday, July 5, 2025, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2025-07-05 16:13:08 | Re: Unexpected behavior when setting "idle_replication_slot_timeout" |
Previous Message | David G. Johnston | 2025-07-05 15:12:01 | Re: Unexpected behavior when setting "idle_replication_slot_timeout" |