Restrict deadlock_timeout to the range for which the implementation
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 20 Jun 2007 18:31:39 +0000 (18:31 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 20 Jun 2007 18:31:39 +0000 (18:31 +0000)
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.

src/backend/utils/misc/guc.c

index c1e9d8e7213ee6eb77fc5e4befc8d3cb9f4aa36d..f83c51b928ca0686a1827b0ffc0c54cbb768b5a1 100644 (file)
@@ -10,7 +10,7 @@
  * Written by Peter Eisentraut <peter_e@gmx.net>.
  *
  * 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[] =
                        GUC_UNIT_MS
                },
                &DeadlockTimeout,
-               1000, 0, INT_MAX, NULL, NULL
+               1000, 1, INT_MAX/1000, NULL, NULL
        },
 
        /*