mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Add lock_timeout configuration parameter.
This GUC allows limiting the time spent waiting to acquire any one heavyweight lock. In support of this, improve the recently-added timeout infrastructure to permit efficiently enabling or disabling multiple timeouts at once. That reduces the performance hit from turning on lock_timeout, though it's still not zero. Zoltán Böszörményi, reviewed by Tom Lane, Stephen Frost, and Hari Babu
This commit is contained in:
@ -1861,6 +1861,17 @@ static struct config_int ConfigureNamesInt[] =
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"lock_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT,
|
||||
gettext_noop("Sets the maximum allowed duration of any wait for a lock."),
|
||||
gettext_noop("A value of 0 turns off the timeout."),
|
||||
GUC_UNIT_MS
|
||||
},
|
||||
&LockTimeout,
|
||||
0, 0, INT_MAX,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"vacuum_freeze_min_age", PGC_USERSET, CLIENT_CONN_STATEMENT,
|
||||
gettext_noop("Minimum age at which VACUUM should freeze a table row."),
|
||||
|
Reference in New Issue
Block a user