Mikael Krantz wrote:
> On Wed, May 6, 2009 at 6:26 PM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>>> How to reproduce:
>>> * restore from backup
>>> * SELECT pg_start_backup('label');
>>> * take a new backup
>>> * SELECT pg_stop_backup();
>>> * copy the relevant WAL-files
>>> * try to restore the backup
>> I failed to reproduce this. Is it possible that the history file went
>> missing in the process? That's needed to recover WAL files from timelines
>> other than the latest one. You should only get that "unexpected timeline ID"
>> message if the history file doesn't contain a line for that timeline ID.
> Yes that's true. The history file is not included in the backup. It is
> archived before the backup starts and is not included in the
> range specified in the backup file (e.g:
> Doesn't this mean that the range of log-files in the backup file is
> incorrect? If the first WAL-file in the range contain records
> referring to earlier timelines I will have to backup the .history-file
> of that timeline in addition to the WAL-files explicitly required for
> the backup. Or force a switch of log-files before starting the backup
> as I'm currently doing.
Yeah, I think you're right. If you omit pg_xlog from the base backup, as
we recommend in the manual, and clear the old files from the archive
too, then you won't have the old history file around.
I'll make pg_start_backup() to request xlog switch before the checkpoint
as you suggested. That's an easy fix that can be easily back-patched.
In response to
pgsql-hackers by date
|Next:||From: Laurent Laborde||Date: 2009-05-07 09:25:15|
|Subject: Re: create if not exists (CINE)|
|Previous:||From: Mikael Krantz||Date: 2009-05-07 07:56:23|
|Subject: Re: BUG #4796: Recovery followed by backup creates unrecoverable WAL-file|
pgsql-bugs by date
|Next:||From: Heikki Linnakangas||Date: 2009-05-07 11:34:53|
|Subject: Re: BUG #4796: Recovery followed by backup creates unrecoverable
|Previous:||From: Dave Page||Date: 2009-05-07 08:30:48|
|Subject: Re: BUG #4785: Installation fails|