]> granicus.if.org Git - postgresql/commit
Allow auto_explain.log_min_duration to go up to INT_MAX.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 23 Feb 2018 19:38:19 +0000 (14:38 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 23 Feb 2018 19:39:18 +0000 (14:39 -0500)
commit0222e897d8dc063f92a3e2058ae301e14014a7c3
tree0893366734d80ac91861283a2b99697957d266a5
parent14bd9bcd54bc9618f89cf38d3c1c641bb93729a0
Allow auto_explain.log_min_duration to go up to INT_MAX.

The previous limit of INT_MAX / 1000 seems to have been cargo-culted in
from somewhere else.  Or possibly the value was converted to microseconds
at some point; but in all supported releases, it's just compared to other
values, so there's no need for the restriction.  This change raises the
effective limit from ~35 minutes to ~24 days, which conceivably is useful
to somebody, and anyway it's more consistent with the range of the core
log_min_duration_statement GUC.

Per complaint from Kevin Bloch.  Back-patch to all supported releases.

Discussion: https://postgr.es/m/8ea82d7e-cb78-8e05-0629-73aa14d2a0ca@codingthat.com
contrib/auto_explain/auto_explain.c