Re: Re: [BUGS] BUG #4796: Recovery followed by backup creates unrecoverable WAL-file - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Re: [BUGS] BUG #4796: Recovery followed by backup creates unrecoverable WAL-file
Date
Msg-id 1242390135.3843.715.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Re: [BUGS] BUG #4796: Recovery followed by backup creates unrecoverable WAL-file  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Re: [BUGS] BUG #4796: Recovery followed by backup creates unrecoverable WAL-file  (Mikael Krantz <mk@zigamorph.se>)
Re: Re: [BUGS] BUG #4796: Recovery followed by backup creates unrecoverable WAL-file  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Re: Re: [BUGS] BUG #4796: Recovery followed by backup creates unrecoverable WAL-file  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
On Fri, 2009-05-15 at 14:56 +0300, Heikki Linnakangas wrote:

> Simon's idea of keeping a copy of all the history files in the data 
> directory wouldn't help here. In fact, I think we already never delete 
> history files in the server, it's just that if you omit the pg_xlog 
> directory in the base backup they won't be included. But even if they 
> are included in the base backup, that wouldn't help in this scenario 
> because the base backup still wouldn't contain the history files for the 
> later timelines.

You're right there. 

That still leaves the problem that we need to know the later history,
even if we don't use it.

> If you delete history file and all the WAL for timeline 6, yeah, nothing 
> stops it from being reused. It will work just fine, as if it never 
> existed. If you still have the history file and WAL for the old timeline 
> 6 lying around somewhere else like an older offsite backup, it's easy 
> for the administrator to get confused, but there isn't much we can do 
> about that.

ehem, "It will work fine" isn't correct, as Fujii-san observes.

Let's document that timeline files should not be deleted from the
archive iff there exists a base backup made during a lower numbered
timeline.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Re: [BUGS] BUG #4796: Recovery followed by backup creates unrecoverable WAL-file
Next
From: Heikki Linnakangas
Date:
Subject: Re: Re: [BUGS] BUG #4796: Recovery followed by backup creates unrecoverable WAL-file