]> granicus.if.org Git - postgresql/commitdiff
pg_upgrade: force timeline 1 in the new cluster
authorBruce Momjian <bruce@momjian.us>
Sat, 16 May 2015 04:40:18 +0000 (00:40 -0400)
committerBruce Momjian <bruce@momjian.us>
Sat, 16 May 2015 04:40:18 +0000 (00:40 -0400)
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

contrib/pg_upgrade/pg_upgrade.c

index 35a0f4304d1c2a0d644052b51529d011fc3fdbbd..5560c15fbaa069bfb55b241205a31ae399498a44 100644 (file)
@@ -520,8 +520,7 @@ copy_clog_xlog_xid(void)
        /* now reset the wal archives in the new cluster */
        prep_status("Resetting WAL archives");
        exec_prog(UTILITY_LOG_FILE, NULL, true,
-                         "\"%s/pg_resetxlog\" -l %u,%u,%u \"%s\"", new_cluster.bindir,
-                         old_cluster.controldata.chkpnt_tli,
+                         "\"%s/pg_resetxlog\" -l 1,%u,%u \"%s\"", new_cluster.bindir,
                          old_cluster.controldata.logid,
                          old_cluster.controldata.nxtlogseg,
                          new_cluster.pgdata);