pgsql: Limit values of archive_timeout, post_auth_delay, auth_delay.mil - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Limit values of archive_timeout, post_auth_delay, auth_delay.mil
Date
Msg-id E1TaD9o-0004mt-1z@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Limit values of archive_timeout, post_auth_delay, auth_delay.milliseconds.

The previous definitions of these GUC variables allowed them to range
up to INT_MAX, but in point of fact the underlying code would suffer
overflows or other errors with large values.  Reduce the maximum values
to something that won't misbehave.  There's no apparent value in working
harder than this, since very large delays aren't sensible for any of
these.  (Note: the risk with archive_timeout is that if we're late
checking the state, the timestamp difference it's being compared to
might overflow.  So we need some amount of slop; the choice of INT_MAX/2
is arbitrary.)

Per followup investigation of bug #7670.  Although this isn't a very
significant fix, might as well back-patch.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/83d48a81f8e25f16a133f56874f1bcdee7838841

Modified Files
--------------
contrib/auth_delay/auth_delay.c |    2 +-
src/backend/utils/misc/guc.c    |    4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix syslogger to not fail when log_rotation_age exceeds 2^31 mil
Next
From: Tom Lane
Date:
Subject: pgsql: Limit values of archive_timeout, post_auth_delay, auth_delay.mil