mirror of
https://github.com/postgres/postgres.git
synced 2025-06-23 14:01:44 +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:
@ -2592,9 +2592,12 @@ _tocEntryIsACL(TocEntry *te)
|
||||
static void
|
||||
_doSetFixedOutputState(ArchiveHandle *AH)
|
||||
{
|
||||
/* Disable statement_timeout in archive for pg_restore/psql */
|
||||
/* Disable statement_timeout since restore is probably slow */
|
||||
ahprintf(AH, "SET statement_timeout = 0;\n");
|
||||
|
||||
/* Likewise for lock_timeout */
|
||||
ahprintf(AH, "SET lock_timeout = 0;\n");
|
||||
|
||||
/* Select the correct character set encoding */
|
||||
ahprintf(AH, "SET client_encoding = '%s';\n",
|
||||
pg_encoding_to_char(AH->public.encoding));
|
||||
|
Reference in New Issue
Block a user