Skip site navigation (1) Skip section navigation (2)

pgsql: Limit values of archive_timeout, post_auth_delay,auth_delay.mil

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Limit values of archive_timeout, post_auth_delay,auth_delay.mil
Date: 2012-11-18 22:16:03
Message-ID: E1TaD9n-0004mq-VZ@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: 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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b6e3798f3aa2747db145f25e03a8d34f2e5ec8c8

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

Next:From: Tom LaneDate: 2012-11-18 22:16:04
Subject: pgsql: Limit values of archive_timeout, post_auth_delay,auth_delay.mil
Previous:From: Tom LaneDate: 2012-11-18 21:17:00
Subject: pgsql: Fix syslogger to not fail when log_rotation_age exceeds 2^31mil

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group