Re: Recovery target 'immediate' - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Recovery target 'immediate'
Date
Msg-id CA+U5nMLxkZxHa9wcnfnu6AGu9GrLj0QQ2DxjV7vKsNeSRMGhsA@mail.gmail.com
Whole thread Raw
In response to Recovery target 'immediate'  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: Recovery target 'immediate'
List pgsql-hackers
On 18 April 2013 19:11, Heikki Linnakangas <hlinnakangas@vmware.com> wrote:

> I just found out that if you use continuous archiving and online backups,
> it's surprisingly difficult to restore a backup, without replaying any more
> WAL than necessary.

I didn't add it myself because I don't see the need, if we think more carefully.

Why would you want your recovery end time to be governed solely by the
time that the *backup* ended? How can that have any bearing on what
you want at recovery time? If you have access to more WAL data, why
would you not apply them as well - unless you have some specific
reason not to - i.e. an incorrect xid or known problem time?

If you're storing only a few of the WAL files with the backup then it
will end naturally without assistance when the last file runs out.
What is the difference between stopping at an exact point in WAL half
way through a file and ending at the end of the file? If the end point
is arbitrary, why the need to specify it so closely?

I can't see a time when I have access to more WAL files *and* I want
to stop early at some imprecise point. But you could write a
restore_command script that stopped after a specific file forcing
recovery to end.

I don't think we should add a feature that encourages the belief that
it makes sense (because its approved by the developers) to stop
recovery at an arbitrary point, deliberately discarding user data.
That just encourages sysadmins to not communicate with
business/management about the exact details of a recovery.

So -1, given it doesn't seem to make sense anyway, but if it did there
are already 2 ways of stopping at an arbitrary point.

--Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pg_controldata gobbledygook
Next
From: Heikki Linnakangas
Date:
Subject: Re: Recovery target 'immediate'