Re: Unnecessary limit on max_standby_streaming_delay - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Unnecessary limit on max_standby_streaming_delay
Date
Msg-id 29595.1292599361@sss.pgh.pa.us
Whole thread Raw
In response to Re: Unnecessary limit on max_standby_streaming_delay  (Greg Smith <greg@2ndquadrant.com>)
List pgsql-hackers
Greg Smith <greg@2ndquadrant.com> writes:
> Magnus Hagander wrote:
>> The limit on max_standby_streaming_delay is currently 35 minutes
>> (around) - or you have to set it to unlimited. This is because the GUC
>> is limited to MAX_INT/1000, unit milliseconds.
>> 
>> Is there a reason for the /1000, or is it just an oversight thinking
>> the unit was in seconds?

> My guess is that the range was limited at some point to avoid concerns 
> of integer overflow in that multiplication, which I don't think actually 
> is a risk due the int64 cast there. 

Yes, it's certainly there on the thought that somebody might try to
convert the value to microseconds in integer arithmetic.  If you run
through all the uses of the variable and confirm that that never
happens, maybe it'd be safe to enlarge the limit.  Check the units-aware
GUC printing code in particular.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)
Next
From: Alvaro Herrera
Date:
Subject: Re: proposal: FOREACH-IN-ARRAY (probably for 9.2?)