From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Point in Time Recovery
Date: Tue, 13 Jul 2004 17:19:56 -0400
Message-ID: <18739.1089753596@sss.pgh.pa.us> (raw)
In-Reply-To: <1089750349.17493.3092.camel@stromboli>
References: <1089060299.17493.58.camel@stromboli>
<4263.1089064016@sss.pgh.pa.us>
<1089150005.17493.270.camel@stromboli>
<1089718702.17493.2527.camel@stromboli>
<15780.1089728984@sss.pgh.pa.us>
<1089750349.17493.3092.camel@stromboli>
Simon Riggs <simon@2ndquadrant.com> writes:
> I'm getting carried away with the improbable....but this is the rather
> strange, but possible scenario I foresee:
> A sequence of times...
> 1. We start archiving xlogs
> 2. We take a checkpoint
> 3. we commit an important transaction
> 4. We take a backup
> 5. We take a checkpoint
> When we specify a recovery target, it is possible to specify the
> rollforward to complete just before point 3.
No, it isn't possible. The recovery *must* proceed at least as far as
wherever the end of the log was at the time the backup was completed.
Otherwise everything is broken, not only clog, because you may have disk
blocks in your backup that postdate where you stopped log replay.
To have a consistent recovery at all, you must replay the log starting
from a checkpoint before the backup began and extending to the time that
the backup finished. You only get to decide where to stop after that
point.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, simon@2ndquadrant.com, pgsql-hackers@postgresql.org
Subject: Re: Point in Time Recovery
In-Reply-To: <18739.1089753596@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox