Re: Unnecessary limit on max_standby_streaming_delay

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unnecessary limit on max_standby_streaming_delay
Date: 2010-12-17 15:22:41
Message-ID: 29595.1292599361@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Smith <greg(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2010-12-17 15:24:17 Re: patch: remove redundant code from pl_exec.c
Previous Message Alvaro Herrera 2010-12-17 15:17:54 Re: patch: remove redundant code from pl_exec.c