Re: Unexpected behavior when setting "idle_replication_slot_timeout" - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: Unexpected behavior when setting "idle_replication_slot_timeout"
Date
Msg-id CAKFQuwbUEOww3_1h_aBnQDWdc1xz5egrP9iE_b_whb2cv3pLLQ@mail.gmail.com
Whole thread Raw
In response to Re: Unexpected behavior when setting "idle_replication_slot_timeout"  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: Unexpected behavior when setting "idle_replication_slot_timeout"
List pgsql-bugs
On Fri, Jul 4, 2025 at 10:35 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On the other hand, if the behavior is clearly documented, as I have
tried to do with my patch, it should be fine.  So I'll rest my case if
you apply my patch.


We should clearly document how rounding works in section 19.1.1 (which we mostly do; "If the parameter is of integer type, a final rounding to integer occurs after any unit conversion.") and not in every time-related setting that chooses to use something larger than microseconds.  So, 30s is 'unit converted' up to 0.5 minutes (not explicitly explained...) then rounded to zero (which is odd, half normally rounds up...).  I'm against cluttering up the individual settings docs with this detail.

If the change from idle to inactive is needed in the description we should just admit we named it wrong in the first place.  As-is, the description matches the name and the callout to the field in the second paragraph precisely clears up what this setting at least cares about.  The reader should be directed to how that field is computed should they need clarification.

Thus, I'd accept but not find required the idle/inactive wording change to any of various degrees; and would ask that any clarification regarding generic setting value interpretation be relegated to 19.1.1 where all such settings can benefit.

David J.






pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Unexpected behavior when setting "idle_replication_slot_timeout"
Next
From: Fujii Masao
Date:
Subject: Re: Unexpected behavior when setting "idle_replication_slot_timeout"