1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Back-patch recent pg_upgrade fixes into 9.2.

This syncs contrib/pg_upgrade in the 9.2 branch with HEAD, except for the
HEAD changes related to converting XLogRecPtr to 64-bit int.  It includes
back-patching these commits:

666d494d19
pg_upgrade: abstract out copying of files from old cluster to new
7afa8bed65
pg_upgrade: Run the created scripts in the test suite
ab577e63fa
Remove analyze_new_cluster.sh on make clean, too
34c02044ed
Fix thinko in comment
088c065ce8
pg_upgrade: Fix exec_prog API to be less flaky
f763b77193
Fix pg_upgrade to cope with non-default unix_socket_directory scenarios.
This commit is contained in:
Tom Lane
2012-09-03 15:03:08 -04:00
parent b681a874d9
commit 5c7e91e9c3
11 changed files with 274 additions and 146 deletions

View File

@ -23,12 +23,11 @@ generate_old_dump(void)
* --binary-upgrade records the width of dropped columns in pg_class, and
* restores the frozenid's for databases and relations.
*/
exec_prog(true, true, UTILITY_LOG_FILE, NULL,
SYSTEMQUOTE "\"%s/pg_dumpall\" --port %d --username \"%s\" "
"--schema-only --binary-upgrade %s > \"%s\" 2>> \"%s\""
SYSTEMQUOTE, new_cluster.bindir, old_cluster.port, os_info.user,
exec_prog(UTILITY_LOG_FILE, NULL, true,
"\"%s/pg_dumpall\" %s --schema-only --binary-upgrade %s -f %s",
new_cluster.bindir, cluster_conn_opts(&old_cluster),
log_opts.verbose ? "--verbose" : "",
ALL_DUMP_FILE, UTILITY_LOG_FILE);
ALL_DUMP_FILE);
check_ok();
}