1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Fix pg_upgrade, broken by the xlogid/segno -> 64-bit int refactoring.

The xlogid + segno representation of a particular WAL segment doesn't make
much sense in pg_resetxlog anymore, now that we don't use that anywhere
else. Use the WAL filename instead, since that's a convenient way to name a
particular WAL segment.

I did this partially for pg_resetxlog in the original xlogid/segno -> uint64
patch, but I neglected pg_upgrade and the docs. This should now be more
complete.
This commit is contained in:
Heikki Linnakangas
2012-06-26 07:35:57 +03:00
parent 8a504a3639
commit 038f3a0509
5 changed files with 51 additions and 44 deletions

View File

@ -354,11 +354,9 @@ copy_clog_xlog_xid(void)
prep_status("Resetting WAL archives");
exec_prog(true, true, UTILITY_LOG_FILE,
SYSTEMQUOTE
"\"%s/pg_resetxlog\" -l %u,%u,%u \"%s\" >> \"%s\" 2>&1"
"\"%s/pg_resetxlog\" -l %s \"%s\" >> \"%s\" 2>&1"
SYSTEMQUOTE, new_cluster.bindir,
old_cluster.controldata.chkpnt_tli,
old_cluster.controldata.logid,
old_cluster.controldata.nxtlogseg,
old_cluster.controldata.nextxlogfile,
new_cluster.pgdata, UTILITY_LOG_FILE);
check_ok();
}