1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Backpatch pg_upgrade fixes to 9.0:

In pg_upgrade, prevent psql AUTOCOMMIT=off by not loading .psqlrc.

 In pg_upgrade, report /bin directory checks independent of /data checks.

 Remove incorrect email address for pg_upgrade bug reports.

 On Win32, pg_upgrade cannot sent any server log output to the log file
 because of file access limitations on that platform.
This commit is contained in:
Bruce Momjian
2010-07-13 20:15:51 +00:00
parent 41252a12d6
commit f53bc2e78d
7 changed files with 111 additions and 120 deletions

View File

@ -4,7 +4,7 @@
* main source file
*
* Copyright (c) 2010, PostgreSQL Global Development Group
* $PostgreSQL: pgsql/contrib/pg_upgrade/pg_upgrade.c,v 1.10 2010/07/06 19:18:55 momjian Exp $
* $PostgreSQL: pgsql/contrib/pg_upgrade/pg_upgrade.c,v 1.10.2.1 2010/07/13 20:15:51 momjian Exp $
*/
#include "pg_upgrade.h"
@ -202,9 +202,10 @@ prepare_new_databases(migratorContext *ctx)
*/
prep_status(ctx, "Creating databases in the new cluster");
exec_prog(ctx, true,
SYSTEMQUOTE "\"%s/psql\" --port %d --username \"%s\" "
"--set ON_ERROR_STOP=on -f \"%s/%s\" --dbname template1 >> \"%s\""
SYSTEMQUOTE,
SYSTEMQUOTE "\"%s/psql\" --set ON_ERROR_STOP=on "
/* --no-psqlrc prevents AUTOCOMMIT=off */
"--no-psqlrc --port %d --username \"%s\" "
"-f \"%s/%s\" --dbname template1 >> \"%s\"" SYSTEMQUOTE,
ctx->new.bindir, ctx->new.port, ctx->user, ctx->cwd,
GLOBALS_DUMP_FILE, ctx->logfile);
check_ok(ctx);
@ -225,9 +226,9 @@ create_new_objects(migratorContext *ctx)
prep_status(ctx, "Restoring database schema to new cluster");
exec_prog(ctx, true,
SYSTEMQUOTE "\"%s/psql\" --port %d --username \"%s\" "
"--set ON_ERROR_STOP=on -f \"%s/%s\" --dbname template1 >> \"%s\""
SYSTEMQUOTE,
SYSTEMQUOTE "\"%s/psql\" --set ON_ERROR_STOP=on "
"--no-psqlrc --port %d --username \"%s\" "
"-f \"%s/%s\" --dbname template1 >> \"%s\"" SYSTEMQUOTE,
ctx->new.bindir, ctx->new.port, ctx->user, ctx->cwd,
DB_DUMP_FILE, ctx->logfile);
check_ok(ctx);