From acd75b2643579a26adfbfaa4918e60121ae2c26f Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 16 May 2015 00:40:18 -0400 Subject: [PATCH] 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 --- contrib/pg_upgrade/pg_upgrade.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/pg_upgrade/pg_upgrade.c b/contrib/pg_upgrade/pg_upgrade.c index 62764f43d33..fdf3eeffefd 100644 --- a/contrib/pg_upgrade/pg_upgrade.c +++ b/contrib/pg_upgrade/pg_upgrade.c @@ -512,8 +512,8 @@ copy_clog_xlog_xid(void) /* now reset the wal archives in the new cluster */ prep_status("Resetting WAL archives"); - exec_prog(true, SYSTEMQUOTE "\"%s/pg_resetxlog\" -l %u,%u,%u \"%s\" >> \"%s\" 2>&1" SYSTEMQUOTE, - new_cluster.bindir, old_cluster.controldata.chkpnt_tli, + exec_prog(true, SYSTEMQUOTE "\"%s/pg_resetxlog\" -l 1,%u,%u \"%s\" >> \"%s\" 2>&1" SYSTEMQUOTE, + new_cluster.bindir, old_cluster.controldata.logid, old_cluster.controldata.nxtlogseg, new_cluster.pgdata, #ifndef WIN32