]> granicus.if.org Git - postgresql/commit
Limit values of archive_timeout, post_auth_delay, auth_delay.milliseconds.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 18 Nov 2012 22:15:16 +0000 (17:15 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 18 Nov 2012 22:15:16 +0000 (17:15 -0500)
commitfe838e5074149058a1101092d3a557e4b86b8ff2
treec2c5e3a5e4f032b86de7de5994af2f23fac529d2
parente9ad86ce6803faecda721311ff04dde88b38583b
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.
contrib/auth_delay/auth_delay.c
src/backend/utils/misc/guc.c