Broken WAL recovery, resetting to base timeline

From: David Jantzen <djantzen(at)ql2(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Broken WAL recovery, resetting to base timeline
Date: 2009-10-08 18:08:26
Message-ID: FAEC8C4B-CE2F-4D3B-AEB3-9B1E71CFCAF5@ql2.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,

While recovering a database, we encountered a file permissions problem on new WAL segments that caused recovery with pg_standby to exit prematurely. Now the database is in a new timeline. What we need to do (I think) is reset the database timeline to that of the base copy and resume restoration. The error messages were:

LOG: restored log file "000000020000071900000006" from archive
LOG: restored log file "000000020000071900000007" from archive
LOG: restored log file "000000020000071900000008" from archive
LOG: restored log file "000000020000071900000009" from archive
LOG: could not open file "pg_xlog/00000002000007190000000A" (log file
1817, segment 10): No such file or directory
LOG: redo done at 719/9FFFFA8
LOG: last completed transaction was at log time 2009-10-05
11:27:22.714406-07
LOG: restored log file "000000020000071900000009" from archive
LOG: selected new timeline ID: 3
LOG: archive recovery complete
LOG: autovacuum launcher started
LOG: database system is ready to accept connections

The database is now in timeline 3, and the next WAL segment we need to replay is 000000020000071900000009. Will the following do the right thing?

pg_resetxlog -l 0x2,0x719,0x9 data_dir

If not, what's the proper approach to take? PG version is 8.3.7.

Thanks Much,
David

Browse pgsql-general by date

  From Date Subject
Next Message Barbara Stephenson 2009-10-08 18:12:38 Remote connection timed out
Previous Message Daniel Shane 2009-10-08 18:07:50 Re: Tips/Hacks to create minial DB from the execution of several (simple) SQL requests.