aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Bossart <nathan@postgresql.org>2024-07-01 10:18:26 -0500
committerNathan Bossart <nathan@postgresql.org>2024-07-01 10:18:26 -0500
commit6e16b1e42003d811562d30b572ac3972238e2957 (patch)
treec9d788526c1f8f072d8512c5fa937a6af9881612
parent3fb59e789dd9f21610101d1ec106ad58095e24f3 (diff)
downloadpostgresql-6e16b1e42003d811562d30b572ac3972238e2957.tar.gz
postgresql-6e16b1e42003d811562d30b572ac3972238e2957.zip
Add --no-sync to pg_upgrade's uses of pg_dump and pg_dumpall.
There's no reason to ensure that the files pg_upgrade generates with pg_dump and pg_dumpall have been written safely to disk. If there is a crash during pg_upgrade, the upgrade must be restarted from the beginning; dump files left behind by previous pg_upgrade attempts cannot be reused. Reviewed-by: Peter Eisentraut, Tom Lane, Michael Paquier, Daniel Gustafsson Discussion: https://postgr.es/m/20240503171348.GA1731524%40nathanxps13
-rw-r--r--src/bin/pg_upgrade/dump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_upgrade/dump.c b/src/bin/pg_upgrade/dump.c
index 29fb45b9289..8345f55be8a 100644
--- a/src/bin/pg_upgrade/dump.c
+++ b/src/bin/pg_upgrade/dump.c
@@ -22,7 +22,7 @@ generate_old_dump(void)
/* run new pg_dumpall binary for globals */
exec_prog(UTILITY_LOG_FILE, NULL, true, true,
"\"%s/pg_dumpall\" %s --globals-only --quote-all-identifiers "
- "--binary-upgrade %s -f \"%s/%s\"",
+ "--binary-upgrade %s --no-sync -f \"%s/%s\"",
new_cluster.bindir, cluster_conn_opts(&old_cluster),
log_opts.verbose ? "--verbose" : "",
log_opts.dumpdir,
@@ -53,7 +53,7 @@ generate_old_dump(void)
parallel_exec_prog(log_file_name, NULL,
"\"%s/pg_dump\" %s --schema-only --quote-all-identifiers "
- "--binary-upgrade --format=custom %s --file=\"%s/%s\" %s",
+ "--binary-upgrade --format=custom %s --no-sync --file=\"%s/%s\" %s",
new_cluster.bindir, cluster_conn_opts(&old_cluster),
log_opts.verbose ? "--verbose" : "",
log_opts.dumpdir,