Re: Point in Time Recovery

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Point in Time Recovery
Date: 2004-07-13 23:21:28
Message-ID: 1089760888.17493.3347.camel@stromboli
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers pgsql-patches

On Wed, 2004-07-14 at 00:01, Bruce Momjian wrote:
> Tom Lane wrote:
> > Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> > > So the situation is:
> > > - You must only stop recovery at a point in time (in the logs) after the
> > > backup had completed.
> >
> > Right.
> >
> > > No way to enforce that currently, apart from procedurally. Not exactly
> > > frequent, so I think I just document that and move on, eh?
> >
> > The procedure that generates a backup has got to be responsible for
> > recording both the start and stop times. If it does not do so then
> > it's fatally flawed. (Note also that you had better be careful to get
> > the time as seen on the server machine's clock ... this could be a nasty
> > gotcha if the backup is run on a different machine, such as an NFS
> > server.)
>
> OK, but procedurally, how do you correlate the start/stop time of the
> tar backup with the WAL numeric file names?

No need. You just correlate the recovery target with the backup file
times. Mostly, you'll only ever use your last backup and won't need to
fuss with the times.

Backup should begin with a CHECKPOINT...then wait for that to complete,
just to make the backup as current as possible.

If you want to start purging your archives of old archived xlogs, you
can use the filedate (assuming you preserved that on your copy to
archive - but even if not, they'll be fairly close).

Best regards, Simon Riggs

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2004-07-13 23:28:21 Re: Point in Time Recovery
Previous Message Simon Riggs 2004-07-13 23:13:37 Re: [HACKERS] Point in Time Recovery

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-07-13 23:28:21 Re: Point in Time Recovery
Previous Message Simon Riggs 2004-07-13 23:13:37 Re: [HACKERS] Point in Time Recovery

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2004-07-13 23:23:04 Re: PITR Archive Recovery plus WIP PITR
Previous Message Simon Riggs 2004-07-13 23:13:37 Re: [HACKERS] Point in Time Recovery