1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-05 23:56:58 +03:00

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
This commit is contained in:
Bruce Momjian 2015-05-16 00:40:18 -04:00
parent 321db71239
commit acd75b2643

View File

@ -512,8 +512,8 @@ copy_clog_xlog_xid(void)
/* now reset the wal archives in the new cluster */ /* now reset the wal archives in the new cluster */
prep_status("Resetting WAL archives"); prep_status("Resetting WAL archives");
exec_prog(true, SYSTEMQUOTE "\"%s/pg_resetxlog\" -l %u,%u,%u \"%s\" >> \"%s\" 2>&1" SYSTEMQUOTE, exec_prog(true, SYSTEMQUOTE "\"%s/pg_resetxlog\" -l 1,%u,%u \"%s\" >> \"%s\" 2>&1" SYSTEMQUOTE,
new_cluster.bindir, old_cluster.controldata.chkpnt_tli, new_cluster.bindir,
old_cluster.controldata.logid, old_cluster.controldata.nxtlogseg, old_cluster.controldata.logid, old_cluster.controldata.nxtlogseg,
new_cluster.pgdata, new_cluster.pgdata,
#ifndef WIN32 #ifndef WIN32