Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb6e3798

Browse files
committed
Limit values of archive_timeout, post_auth_delay, auth_delay.milliseconds.
The previous definitions of these GUC variables allowed them to rangeup to INT_MAX, but in point of fact the underlying code would sufferoverflows or other errors with large values. Reduce the maximum valuesto something that won't misbehave. There's no apparent value in workingharder than this, since very large delays aren't sensible for any ofthese. (Note: the risk with archive_timeout is that if we're latechecking the state, the timestamp difference it's being compared tomight overflow. So we need some amount of slop; the choice of INT_MAX/2is arbitrary.)Per followup investigation of bug #7670. Although this isn't a verysignificant fix, might as well back-patch.
1 parentd038966 commitb6e3798

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎contrib/auth_delay/auth_delay.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ _PG_init(void)
5959
NULL,
6060
&auth_delay_milliseconds,
6161
0,
62-
0,INT_MAX,
62+
0,INT_MAX /1000,
6363
PGC_SIGHUP,
6464
GUC_UNIT_MS,
6565
NULL,

‎src/backend/utils/misc/guc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,7 +1466,7 @@ static struct config_int ConfigureNamesInt[] =
14661466
GUC_UNIT_S
14671467
},
14681468
&XLogArchiveTimeout,
1469-
0,0,INT_MAX,
1469+
0,0,INT_MAX /2,
14701470
NULL,NULL,NULL
14711471
},
14721472
{
@@ -1476,7 +1476,7 @@ static struct config_int ConfigureNamesInt[] =
14761476
GUC_NOT_IN_SAMPLE |GUC_UNIT_S
14771477
},
14781478
&PostAuthDelay,
1479-
0,0,INT_MAX,
1479+
0,0,INT_MAX /1000000,
14801480
NULL,NULL,NULL
14811481
},
14821482
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp