Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit17a56c0

Browse files
committed
Disable statement timeouts while making or restoring dumps.
Joshua Drake.
1 parentc88850f commit17a56c0

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)

[8]ページ先頭

©2009-2025 Movatter.jp