From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | Kevin Bloch <kev(at)codingthat(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: maximum for auto_explain.log_min_duration doesn't seem to make sense |
Date: | 2018-02-23 19:25:59 |
Message-ID: | 16575.1519413959@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Fri, Feb 23, 2018 at 11:34 AM, Kevin Bloch <kev(at)codingthat(dot)com> wrote:
>> According to https://dba.stackexchange.com/a/198429/28774 , this setting
>> maxes out at INT_MAX / 1000, but since it's never multiplied by 1000 or any
>> other number, it seems it should perhaps just be INT_MAX
> I suspect that the counter to which that value is being compared also
> wants to be an INT and if one checks for "val > INT_MAX" then val cannot be
> restricted to an integer (and since we are capturing time we need some
> unknown buffer).
No, a look at the code shows that it's being compared to a double.
So there's no practical problem with increasing that GUC's limit to
INT_MAX. As to whether it's worth doing, the existing limit is equivalent
to ~35 minutes if I did the math right. I can barely imagine that anyone
would want to set auto_explain.log_min_duration higher than that, but
maybe in some huge data warehouse environment it'd make sense. Anyway,
I notice that the core backend's log_min_duration GUC, which is also
measured in ms, is allowed to go up to INT_MAX; so it seems a bit
inconsistent that this one isn't.
In short, seems like a valid complaint to me.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2018-02-23 19:27:29 | Re: maximum for auto_explain.log_min_duration doesn't seem to make sense |
Previous Message | Kevin Bloch | 2018-02-23 19:07:30 | Re: maximum for auto_explain.log_min_duration doesn't seem to make sense |