mirror of
https://github.com/postgres/postgres.git
synced 2025-05-12 16:21:30 +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:
parent
4cfba53698
commit
bffbeec0cb
@ -659,8 +659,9 @@ 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(UTILITY_LOG_FILE, NULL, true,
|
exec_prog(UTILITY_LOG_FILE, NULL, true,
|
||||||
"\"%s/pg_resetxlog\" -l %s \"%s\"", new_cluster.bindir,
|
/* use timeline 1 to match controldata and no WAL history file */
|
||||||
old_cluster.controldata.nextxlogfile,
|
"\"%s/pg_resetxlog\" -l 00000001%s \"%s\"", new_cluster.bindir,
|
||||||
|
old_cluster.controldata.nextxlogfile + 8,
|
||||||
new_cluster.pgdata);
|
new_cluster.pgdata);
|
||||||
check_ok();
|
check_ok();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user