Content-Length: 261279 | pFad | http://github.com/postgrespro/postgres/commit/387a3e46cfdddad2e07f0d1a47d8fcdba89351cd

85 pg_upgrade: force timeline 1 in the new cluster · postgrespro/postgres@387a3e4 · GitHub
Skip to content

Commit 387a3e4

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 31f5d3f commit 387a3e4

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
@@ -658,8 +658,9 @@ copy_clog_xlog_xid(void)
658658
/* now reset the wal archives in the new cluster */
659659
prep_status("Resetting WAL archives");
660660
exec_prog(UTILITY_LOG_FILE, NULL, true,
661-
"\"%s/pg_resetxlog\" -l %s \"%s\"", new_cluster.bindir,
662-
old_cluster.controldata.nextxlogfile,
661+
/* use timeline 1 to match controldata and no WAL history file */
662+
"\"%s/pg_resetxlog\" -l 00000001%s \"%s\"", new_cluster.bindir,
663+
old_cluster.controldata.nextxlogfile + 8,
663664
new_cluster.pgdata);
664665
check_ok();
665666
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/387a3e46cfdddad2e07f0d1a47d8fcdba89351cd

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy