1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Fix pg_upgrade file share violation on Windows created by the commit

4741e9afb9.  This was done by adding an
optional second log file parameter to exec_prog(), and closing and
reopening the log file between system() calls.

Backpatch to 9.2.
This commit is contained in:
Bruce Momjian
2012-08-07 13:10:44 -04:00
parent 3a42a3ffd8
commit fbcfa90bb8
6 changed files with 41 additions and 25 deletions

View File

@ -23,7 +23,7 @@ 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,
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,