Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6f0072d

Browse files
committed
Restrict deadlock_timeout to the range for which the implementation
actually works sanely, viz not 0 and not more than INT_MAX/1000 (else TimestampTzPlusMilliseconds can overflow). Per discussion with Greg Stark. Since this is a superuser-only setting and there was not previously any big reason to change it, not worth back-patching.
1 parent cd40735 commit 6f0072d

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
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.399 2007/06/19 20:13:22 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.400 2007/06/20 18:31:39 tgl Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -1173,7 +1173,7 @@ static struct config_int ConfigureNamesInt[] =
11731173
GUC_UNIT_MS
11741174
},
11751175
&DeadlockTimeout,
1176-
1000, 0, INT_MAX, NULL, NULL
1176+
1000, 1, INT_MAX/1000, NULL, NULL
11771177
},
11781178

11791179
/*

0 commit comments

Comments
 (0)