From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Kevin Bloch <kev@codingthat.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: maximum for auto_explain.log_min_duration doesn't seem to make sense
Date: Fri, 23 Feb 2018 14:25:59 -0500
Message-ID: <16575.1519413959@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwaPyFHN=cmEhOYdd2R5daZP2Wn0og9M8BEPE5k_tuQYjA@mail.gmail.com>
References: <8ea82d7e-cb78-8e05-0629-73aa14d2a0ca@codingthat.com>
<CAKFQuwaPyFHN=cmEhOYdd2R5daZP2Wn0og9M8BEPE5k_tuQYjA@mail.gmail.com>
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Fri, Feb 23, 2018 at 11:34 AM, Kevin Bloch <kev@codingthat.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, kev@codingthat.com, pgsql-bugs@lists.postgresql.org
Subject: Re: maximum for auto_explain.log_min_duration doesn't seem to make sense
In-Reply-To: <16575.1519413959@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox