pg_upgrade: update C comments about pg_dumpall
authorBruce Momjian <bruce@momjian.us>
Mon, 30 Jun 2014 23:55:55 +0000 (19:55 -0400)
committerBruce Momjian <bruce@momjian.us>
Mon, 30 Jun 2014 23:56:23 +0000 (19:56 -0400)
There were some C comments that hadn't been updated from the switch of
using only pg_dumpall to using pg_dump and pg_dumpall, so update them.
Also, don't bother using --schema-only for pg_dumpall --globals-only.

Backpatch through 9.4

contrib/pg_upgrade/check.c
contrib/pg_upgrade/dump.c
contrib/pg_upgrade/exec.c
contrib/pg_upgrade/function.c
contrib/pg_upgrade/info.c
contrib/pg_upgrade/pg_upgrade.c

index edfe7e114bd1b3e3e817293de609a1e266afc16c..ba9407d9b5871973e48b8e59a244af308c9a970f 100644 (file)
@@ -285,9 +285,9 @@ check_cluster_versions(void)
                 PG_MAJORVERSION);
 
    /*
-    * We can't allow downgrading because we use the target pg_dumpall, and
-    * pg_dumpall cannot operate on new database versions, only older
-    * versions.
+    * We can't allow downgrading because we use the target pg_dump, and
+    * pg_dump cannot operate on newer database versions, only current and
+    * older versions.
     */
    if (old_cluster.major_version > new_cluster.major_version)
        pg_fatal("This utility cannot be used to downgrade to older major PostgreSQL versions.\n");
index 6c7661049c7be5925343effacd7141ebc13e4cc3..b112f3a95276e7eea538494de1d16f10bcf3573a 100644 (file)
@@ -23,8 +23,8 @@ generate_old_dump(void)
 
    /* run new pg_dumpall binary for globals */
    exec_prog(UTILITY_LOG_FILE, NULL, true,
-             "\"%s/pg_dumpall\" %s --schema-only --globals-only "
-             "--quote-all-identifiers --binary-upgrade %s -f %s",
+             "\"%s/pg_dumpall\" %s --globals-only --quote-all-identifiers "
+             "--binary-upgrade %s -f %s",
              new_cluster.bindir, cluster_conn_opts(&old_cluster),
              log_opts.verbose ? "--verbose" : "",
              GLOBALS_DUMP_FILE);
index 6c217c902d86cc97f111ee7ba0c32a4b5aa0f725..c177288255681ecd0000d2c6188c4022ed95e96c 100644 (file)
@@ -321,6 +321,7 @@ check_bin_dir(ClusterInfo *cluster)
    {
        /* these are only needed in the new cluster */
        validate_exec(cluster->bindir, "psql");
+       validate_exec(cluster->bindir, "pg_dump");
        validate_exec(cluster->bindir, "pg_dumpall");
    }
 }
index f2cd4716c72958bf3f28a2385bc4bb11a81cd977..a4dec6ea88ac3a3e6933c2486aa71d49b95eb4c3 100644 (file)
@@ -161,7 +161,7 @@ get_loadable_libraries(void)
        /*
         * Systems that install plpython before 8.1 have
         * plpython_call_handler() defined in the "public" schema, causing
-        * pg_dumpall to dump it.  However that function still references
+        * pg_dump to dump it.  However that function still references
         * "plpython" (no "2"), so it throws an error on restore.  This code
         * checks for the problem function, reports affected databases to the
         * user and explains how to remove them. 8.1 git commit:
index d2968b479a930673fa61093970ddccf9a1e86483..6205c7457467cb14a83a0eda7148eafdeb865f4e 100644 (file)
@@ -274,7 +274,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
               *last_tablespace = NULL;
 
    /*
-    * pg_largeobject contains user data that does not appear in pg_dumpall
+    * pg_largeobject contains user data that does not appear in pg_dump
     * --schema-only output, so we have to copy that system table heap and
     * index.  We could grab the pg_largeobject oids from template1, but it is
     * easy to treat it as a normal table. Order by oid so we can join old/new
index c7386cdd3d3bc74b60fb57fb5cd0f6353988c10a..ea1f9f663e40db1db25d91d6a79db7b5215ea7df 100644 (file)
@@ -491,7 +491,7 @@ copy_clog_xlog_xid(void)
  *
  * We have frozen all xids, so set relfrozenxid and datfrozenxid
  * to be the old cluster's xid counter, which we just set in the new
- * cluster.  User-table frozenxid values will be set by pg_dumpall
+ * cluster.  User-table frozenxid values will be set by pg_dump
  * --binary-upgrade, but objects not set by the pg_dump must have
  * proper frozen counters.
  */