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

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Mikael Krantz <mk(at)zigamorph(dot)se>, pgsql-bugs(at)postgresql(dot)org, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BUG #4796: Recovery followed by backup creates unrecoverable WAL-file
Date: 2009-05-07 14:54:33
Message-ID: 4A02F629.1030605@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Simon Riggs wrote:
> On Thu, 2009-05-07 at 12:15 +0300, Heikki Linnakangas wrote:
>
>> 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.
>
> ...
> 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.

The advantage of that over switching xlog segment in pg_start_backup()
would be that you would go through fewer XLOG segments if you took
backups often.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Simon Riggs 2009-05-07 15:14:36 Re: [HACKERS] Re: BUG #4796: Recovery followed by backup creates unrecoverable WAL-file
Previous Message Simon Riggs 2009-05-07 13:08:42 Re: BUG #4796: Recovery followed by backup creates unrecoverable WAL-file

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-05-07 15:14:35 Re: Patch to fix search_path defencies with pg_bench
Previous Message Albe Laurenz 2009-05-07 14:40:47 Re: Serializable Isolation without blocking