Re: PITR Functional Design v2 for 7.5 - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: PITR Functional Design v2 for 7.5
Date
Msg-id 006a01c4062b$a536f820$f3bd87d9@LaptopDellXP
Whole thread Raw
In response to Re: PITR Functional Design v2 for 7.5  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
> what I don't see in your paper or the proposed API
> is a
> way to coordinate full back-ups and WAL archiving.   Obviously, the
PITR
> Archive is only useful in reference to an existing full backup, so it
is
> important to be able to associate a set of PITR archives with a
particular
> full backup, or with some kind of "backup checkpoint".   I'm sure that
you
> have a solution for this, I just didn't see it explained in your
proposal,
> or
> didn't understand it.

You are perceptive, and generous in imagining I have a good solution. I
will document this, assuming no better ideas emerge:

My understanding is this:
When crash recovery occurs, recovery starts from this last checkpoint,
not from the earliest log. Existing function caters for locating start
of xlogs for recovery purposes. 
Relying upon that, it should be possible to have a backup coordinate
with a stream of xlogs at recovery time, but not EXACTLY at backup time.
Best practice would indicate that you should always maintain 2-3 full
backups, so deleting xlogs immediately after a backup is not a very good
idea at all.

In general, the usage is going to be:
- start archiver
- start PostgreSQL- interval during which xlogs are backed up
- start backup

Best Regards, Simon Riggs



pgsql-hackers by date:

Previous
From: "Simon Riggs"
Date:
Subject: PITR: Request for assistance with alpha test plan
Next
From: Andrew Dunstan
Date:
Subject: Re: cvs breakage