Re: maximum for auto_explain.log_min_duration doesn't seem to make sense
David G. Johnston <david.g.johnston@gmail.com>
From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Kevin Bloch <kev@codingthat.com>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2018-02-23T19:02:58Z
Lists: pgsql-bugs
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). As for the post question: What can I do if I want to log even longer-running queries on a data warehouse? The answer is "nothing special, anything running longer than the supplied value will be logged". What you cannot do is choose not to log a subset of queries that take longer INT_MAX/1,000 and less then infinity - once you hit INT_MAX/1,000 you must log it. David J.
Commits
-
Allow auto_explain.log_min_duration to go up to INT_MAX.
- a7a6051cfdbb 9.3.22 landed
- 3ba503bde9ae 9.4.17 landed
- 753875ed42fd 9.5.12 landed
- be87cd2a0aa0 9.6.8 landed
- 0222e897d8dc 10.3 landed
- 8af87f411c15 11.0 landed