X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4D74FD1B198 for ; Tue, 13 Jul 2004 19:52:39 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 11720-01 for ; Tue, 13 Jul 2004 22:52:38 +0000 (GMT) Received: from cmailm3.svr.pol.co.uk (cmailm3.svr.pol.co.uk [195.92.193.19]) by svr1.postgresql.org (Postfix) with ESMTP id 0EA8ED1B181 for ; Tue, 13 Jul 2004 19:52:35 -0300 (ADT) Received: from modem-1511.orangutan.dialup.pol.co.uk ([217.135.229.231] helo=[192.168.0.100]) by cmailm3.svr.pol.co.uk with esmtp (Exim 4.14) id 1BkW8Z-0005z3-Hq; Tue, 13 Jul 2004 23:52:35 +0100 Subject: Re: Point in Time Recovery From: Simon Riggs To: Bruce Momjian Cc: Tom Lane , pgsql-hackers@postgresql.org In-Reply-To: <200407132242.i6DMgg612564@candle.pha.pa.us> References: <200407132242.i6DMgg612564@candle.pha.pa.us> Content-Type: text/plain Organization: 2nd Quadrant Message-Id: <1089759153.17493.3270.camel@stromboli> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Tue, 13 Jul 2004 23:52:34 +0100 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200407/727 X-Sequence-Number: 56288 On Tue, 2004-07-13 at 23:42, Bruce Momjian wrote: > Simon Riggs wrote: > > On Tue, 2004-07-13 at 22:19, Tom Lane wrote: > > > > > 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. > > > > > > > So the situation is: > > - You must only stop recovery at a point in time (in the logs) after the > > backup had completed. > > > > No way to enforce that currently, apart from procedurally. Not exactly > > frequent, so I think I just document that and move on, eh? > > If it happens, could you use your previous full backup and the PITR logs > from before stop stopped logging, and then after? Yes. > Is there a period > where they could not restore reliably? Good question. No is the answer. The situation is that the backup isn't timestamped with respect to the logs, so its possible to attempt to use the wrong backup for recovery. The solution is procedural - make sure you timestamp your backup files, so you know which ones to recover with... Best Regards, Simon Riggs