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