Place statement timeout more appropriately, per gripe from Tom.
authorAndrew Dunstan <andrew@dunslane.net>
Sun, 4 May 2008 03:46:08 +0000 (03:46 +0000)
committerAndrew Dunstan <andrew@dunslane.net>
Sun, 4 May 2008 03:46:08 +0000 (03:46 +0000)
src/bin/pg_dump/pg_backup_archiver.c

index 3c8fe7f178236ad345521e6bde4c30b29b572b43..90f97c44caa78afa57d05f1c30c578e0214b5759 100644 (file)
@@ -219,11 +219,6 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
                        ahprintf(AH, "BEGIN;\n\n");
        }
 
-       /*
-        * Disable statement_timeout in archive for pg_restore/psql
-        */
-       ahprintf(AH, "SET statement_timeout = 0;\n");
-
        /*
         * Establish important parameter values right away.
         */
@@ -2140,6 +2135,9 @@ _tocEntryRequired(TocEntry *te, RestoreOptions *ropt, bool include_acls)
 static void
 _doSetFixedOutputState(ArchiveHandle *AH)
 {
+       /* Disable statement_timeout in archive for pg_restore/psql      */
+       ahprintf(AH, "SET statement_timeout = 0;\n")
+
        /* Select the correct character set encoding */
        ahprintf(AH, "SET client_encoding = '%s';\n",
                         pg_encoding_to_char(AH->public.encoding));