Re: Unnecessary limit on max_standby_streaming_delay

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Unnecessary limit on max_standby_streaming_delay
Дата
Msg-id 29595.1292599361@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Unnecessary limit on max_standby_streaming_delay  (Greg Smith <greg@2ndquadrant.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: proposal: FOREACH-IN-ARRAY (probably for 9.2?)