Simon Riggs wrote:
> On Thu, 2009-05-07 at 17:54 +0300, Heikki Linnakangas wrote:
>> Simon Riggs wrote:
>>> A more useful thing might be to do an xlog switch before we do the
>>> shutdown checkpoint at end of recovery. That gives the same sequence of
>>> actions without modifying the existing sequence of activities for
>>> backups, which is delicate enough for me to not want to touch it.
>> Hmm, yeah should work as well. I find the recovery sequence to be even
>> more delicate, though, than pg_start_backup(). I think you'd need to
>> write the XLOG switch record using the old timeline ID, as we currently
>> require that the timeline changes only at a shutdown checkpoint record.
>> That's not hard, but does make me a bit nervous.
> Yes, you're right about the delicacy of all of this so both suggestions
> sound kludgey - the problem is to do with timelines not with sequencing
> of checkpoints and log switches. The problem is Mikael deleted the
> history file and he shouldn't have done that.
I don't see any user error here. What he did was:
1. Restore from backup A
2. Clear old WAL archive
3. pg_start_backup() + tar all but pg_xlog + pg_stop_backup();
4. Restore new backup B
There's no history file in the archive because it was cleared in step 2.
There's nothing wrong with that; you only need to retain WAL files from
the point that you call pg_start_backup(). There's no history file
either in the tar, because pg_xlog was not tarred as we recommend in the
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2009-05-07 16:05:44|
|Subject: Some 8.4 changes needed according to pg_migrator testing|
|Previous:||From: Kevin Grittner||Date: 2009-05-07 15:56:48|
|Subject: Re: Serializable Isolation without blocking|
pgsql-bugs by date
|Next:||From: Simon Riggs||Date: 2009-05-07 17:33:23|
|Subject: Re: [HACKERS] Re: BUG #4796: Recovery followed bybackup creates unrecoverable WAL-file|
|Previous:||From: Simon Riggs||Date: 2009-05-07 15:14:36|
|Subject: Re: [HACKERS] Re: BUG #4796: Recovery followed by backupcreates unrecoverable WAL-file|