8000 pg_upgrade: force timeline 1 in the new cluster · lansz/postgres@affc04d · GitHub
[go: up one dir, main page]

Skip to content

Commit affc04d

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 2a55e71 commit affc04d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

contrib/pg_upgrade/pg_upgrade.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,7 @@ copy_clog_xlog_xid(void)
520520
/* now reset the wal archives in the new cluster */
521521
prep_status("Resetting WAL archives");
522522
exec_prog(UTILITY_LOG_FILE, NULL, true,
523-
"\"%s/pg_resetxlog\" -l %u,%u,%u \"%s\"", new_cluster.bindir,
524-
old_cluster.controldata.chkpnt_tli,
523+
"\"%s/pg_resetxlog\" -l 1,%u,%u \"%s\"", new_cluster.bindir,
525524
old_cluster.controldata.logid,
526525
old_cluster.controldata.nxtlogseg,
527526
new_cluster.pgdata);

0 commit comments

Comments
 (0)
0