OSDN Git Service

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 09c96a7..6f508f7 100644 (file)
@@ -15,7 +15,7 @@
  *
  *
  * IDENTIFICATION
- *             $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.155 2008/05/03 23:32:32 adunstan Exp $
+ *             $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.156 2008/05/04 03:46:08 adunstan Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -220,11 +220,6 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
        }
 
        /*
-        * Disable statement_timeout in archive for pg_restore/psql
-        */
-       ahprintf(AH, "SET statement_timeout = 0;\n");
-
-       /*
         * Establish important parameter values right away.
         */
        _doSetFixedOutputState(AH);
@@ -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));