mirror of
https://github.com/postgres/postgres.git
synced 2025-10-16 17:07:43 +03:00
Force idle_in_transaction_session_timeout off in pg_dump and autovacuum.
We disable statement_timeout and lock_timeout during dump and restore, to
prevent any global settings that might exist from breaking routine backups.
Commit c6dda1f48
should have added idle_in_transaction_session_timeout to
that list, but failed to.
Another place where these timeouts get turned off is autovacuum. While
I doubt an idle timeout could fire there, it seems better to be safe than
sorry.
pg_dump issue noted by Bernd Helmle, the other one found by grepping.
Report: <352F9B77DB5D3082578D17BB@eje.land.credativ.lan>
This commit is contained in:
@@ -2859,11 +2859,12 @@ _doSetFixedOutputState(ArchiveHandle *AH)
|
||||
{
|
||||
RestoreOptions *ropt = AH->public.ropt;
|
||||
|
||||
/* Disable statement_timeout since restore is probably slow */
|
||||
/*
|
||||
* Disable timeouts to allow for slow commands, idle parallel workers, etc
|
||||
*/
|
||||
ahprintf(AH, "SET statement_timeout = 0;\n");
|
||||
|
||||
/* Likewise for lock_timeout */
|
||||
ahprintf(AH, "SET lock_timeout = 0;\n");
|
||||
ahprintf(AH, "SET idle_in_transaction_session_timeout = 0;\n");
|
||||
|
||||
/* Select the correct character set encoding */
|
||||
ahprintf(AH, "SET client_encoding = '%s';\n",
|
||||
|
Reference in New Issue
Block a user