Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Re: BUG #4796: Recovery followed by backup creates unrecoverable WAL-file

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Mikael Krantz <mk(at)zigamorph(dot)se>, pgsql-bugs(at)postgresql(dot)org, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Re: BUG #4796: Recovery followed by backup creates unrecoverable WAL-file
Date: 2009-05-15 12:22:15
Message-ID: 1242390135.3843.715.camel@ebony.2ndQuadrant (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-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.com
 PostgreSQL Training, Services and Support


In response to

Responses

pgsql-hackers by date

Next:From: Mikael KrantzDate: 2009-05-15 12:22:54
Subject: Re: [HACKERS] Re: BUG #4796: Recovery followed by backup creates unrecoverable WAL-file
Previous:From: Heikki LinnakangasDate: 2009-05-15 12:19:19
Subject: Re: [HACKERS] Re: BUG #4796: Recovery followed by backup creates unrecoverable WAL-file

pgsql-bugs by date

Next:From: Mikael KrantzDate: 2009-05-15 12:22:54
Subject: Re: [HACKERS] Re: BUG #4796: Recovery followed by backup creates unrecoverable WAL-file
Previous:From: Heikki LinnakangasDate: 2009-05-15 12:19:19
Subject: Re: [HACKERS] Re: BUG #4796: Recovery followed by backup creates unrecoverable WAL-file

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group