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 21b4d4482bce430312c3c5ea0602331b122702a2..a7454d45efac6d18934e0c21991ce50e4707e041 100644 (file)
@@ -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
        },
 
        /*