Skip to content

Commit 6e16b1e

Browse files
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
1 parent 3fb59e7 commit 6e16b1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/pg_upgrade/dump.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ generate_old_dump(void)
2222
/* run new pg_dumpall binary for globals */
2323
exec_prog(UTILITY_LOG_FILE, NULL, true, true,
2424
"\"%s/pg_dumpall\" %s --globals-only --quote-all-identifiers "
25-
"--binary-upgrade %s -f \"%s/%s\"",
25+
"--binary-upgrade %s --no-sync -f \"%s/%s\"",
2626
new_cluster.bindir, cluster_conn_opts(&old_cluster),
2727
log_opts.verbose ? "--verbose" : "",
2828
log_opts.dumpdir,
@@ -53,7 +53,7 @@ generate_old_dump(void)
5353

5454
parallel_exec_prog(log_file_name, NULL,
5555
"\"%s/pg_dump\" %s --schema-only --quote-all-identifiers "
56-
"--binary-upgrade --format=custom %s --file=\"%s/%s\" %s",
56+
"--binary-upgrade --format=custom %s --no-sync --file=\"%s/%s\" %s",
5757
new_cluster.bindir, cluster_conn_opts(&old_cluster),
5858
log_opts.verbose ? "--verbose" : "",
5959
log_opts.dumpdir,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy