mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +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:
@@ -547,10 +547,11 @@ AutoVacLauncherMain(int argc, char *argv[])
|
||||
SetConfigOption("zero_damaged_pages", "false", PGC_SUSET, PGC_S_OVERRIDE);
|
||||
|
||||
/*
|
||||
* Force statement_timeout to zero to avoid a timeout setting from
|
||||
* preventing regular maintenance from being executed.
|
||||
* Force statement_timeout and lock_timeout to zero to avoid letting these
|
||||
* settings prevent regular maintenance from being executed.
|
||||
*/
|
||||
SetConfigOption("statement_timeout", "0", PGC_SUSET, PGC_S_OVERRIDE);
|
||||
SetConfigOption("lock_timeout", "0", PGC_SUSET, PGC_S_OVERRIDE);
|
||||
|
||||
/*
|
||||
* Force default_transaction_isolation to READ COMMITTED. We don't want
|
||||
@@ -1573,10 +1574,11 @@ AutoVacWorkerMain(int argc, char *argv[])
|
||||
SetConfigOption("zero_damaged_pages", "false", PGC_SUSET, PGC_S_OVERRIDE);
|
||||
|
||||
/*
|
||||
* Force statement_timeout to zero to avoid a timeout setting from
|
||||
* preventing regular maintenance from being executed.
|
||||
* Force statement_timeout and lock_timeout to zero to avoid letting these
|
||||
* settings prevent regular maintenance from being executed.
|
||||
*/
|
||||
SetConfigOption("statement_timeout", "0", PGC_SUSET, PGC_S_OVERRIDE);
|
||||
SetConfigOption("lock_timeout", "0", PGC_SUSET, PGC_S_OVERRIDE);
|
||||
|
||||
/*
|
||||
* Force default_transaction_isolation to READ COMMITTED. We don't want
|
||||
|
Reference in New Issue
Block a user