Commit 6f0072df authored by Tom Lane's avatar Tom Lane

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.
parent cd407354
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>. * Written by Peter Eisentraut <peter_e@gmx.net>.
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.399 2007/06/19 20:13:22 tgl Exp $ * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.400 2007/06/20 18:31:39 tgl Exp $
* *
*-------------------------------------------------------------------- *--------------------------------------------------------------------
*/ */
...@@ -1173,7 +1173,7 @@ static struct config_int ConfigureNamesInt[] = ...@@ -1173,7 +1173,7 @@ static struct config_int ConfigureNamesInt[] =
GUC_UNIT_MS GUC_UNIT_MS
}, },
&DeadlockTimeout, &DeadlockTimeout,
1000, 0, INT_MAX, NULL, NULL 1000, 1, INT_MAX/1000, NULL, NULL
}, },
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment