Skip to content

Commit bffbeec

Browse files
committed
pg_upgrade: force timeline 1 in the new cluster
Previously, this prevented promoted standby servers from being upgraded because of a missing WAL history file. (Timeline 1 doesn't need a history file, and we don't copy WAL files anyway.) Report by Christian Echerer(?), Alexey Klyukin Backpatch through 9.0
1 parent 4cfba53 commit bffbeec

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

contrib/pg_upgrade/pg_upgrade.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,8 +659,9 @@ copy_clog_xlog_xid(void)
659659
/* now reset the wal archives in the new cluster */
660660
prep_status("Resetting WAL archives");
661661
exec_prog(UTILITY_LOG_FILE, NULL, true,
662-
"\"%s/pg_resetxlog\" -l %s \"%s\"", new_cluster.bindir,
663-
old_cluster.controldata.nextxlogfile,
662+
/* use timeline 1 to match controldata and no WAL history file */
663+
"\"%s/pg_resetxlog\" -l 00000001%s \"%s\"", new_cluster.bindir,
664+
old_cluster.controldata.nextxlogfile + 8,
664665
new_cluster.pgdata);
665666
check_ok();
666667
}

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