Skip to content

Commit 17a56c0

Browse files
committed
Disable statement timeouts while making or restoring dumps.
Joshua Drake.
1 parent c88850f commit 17a56c0

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.154 2008/04/13 03:49:21 tgl Exp $
18+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.155 2008/05/03 23:32:32 adunstan Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -219,6 +219,11 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
219219
ahprintf(AH, "BEGIN;\n\n");
220220
}
221221

222+
/*
223+
* Disable statement_timeout in archive for pg_restore/psql
224+
*/
225+
ahprintf(AH, "SET statement_timeout = 0;\n");
226+
222227
/*
223228
* Establish important parameter values right away.
224229
*/

src/bin/pg_dump/pg_dump.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* by PostgreSQL
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.488 2008/04/14 17:05:33 tgl Exp $
15+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.489 2008/05/03 23:32:32 adunstan Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -570,6 +570,12 @@ main(int argc, char **argv)
570570
if (g_fout->remoteVersion >= 80300)
571571
do_sql_command(g_conn, "SET synchronize_seqscans TO off");
572572

573+
/*
574+
* Disable timeouts if supported.
575+
*/
576+
if (g_fout->remoteVersion >= 70300)
577+
do_sql_command(g_conn, "SET statement_timeout = 0");
578+
573579
/*
574580
* Start serializable transaction to dump consistent data.
575581
*/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy