Skip to content

Commit 8728fdc

Browse files
committed
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.
1 parent 46c79df commit 8728fdc

File tree

1 file changed

+2
-2
lines changed
  • src/backend/utils/misc

1 file changed

+2
-2
lines changed

src/backend/utils/misc/guc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ static struct config_int ConfigureNamesInt[] =
11101110
GUC_UNIT_S
11111111
},
11121112
&XLogArchiveTimeout,
1113-
0, 0, INT_MAX, NULL, NULL
1113+
0, 0, INT_MAX / 2, NULL, NULL
11141114
},
11151115
{
11161116
{"post_auth_delay", PGC_BACKEND, DEVELOPER_OPTIONS,
@@ -1119,7 +1119,7 @@ static struct config_int ConfigureNamesInt[] =
11191119
GUC_NOT_IN_SAMPLE | GUC_UNIT_S
11201120
},
11211121
&PostAuthDelay,
1122-
0, 0, INT_MAX, NULL, NULL
1122+
0, 0, INT_MAX / 1000000, NULL, NULL
11231123
},
11241124
{
11251125
{"default_statistics_target", PGC_USERSET, QUERY_TUNING_OTHER,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy