Re: Point in Time Recovery

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>, 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-16 18:30:13
Message-ID: 200407161830.i6GIUDb06348@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs wrote:
> On Fri, 2004-07-16 at 16:58, Zeugswetter Andreas SB SD wrote:
> > > >> Do we need a checkpoint after the archiving
> > > >> starts but before the backup begins?
> > >
> > > > No.
> > >
> > > Actually yes.
> >
> > Sorry, I did incorrectly not connect 'archiving' with the backed up xlogs :-(
> > So yes, you need one checkpoint after archiving starts. Imho turning on xlog
> > archiving should issue such a checkpoint just to be sure.
> >
>
> By agreement, archive_mode can only be turned on at postmaster startup,
> which means you always have a checkpoint - either because you shut it
> down cleanly, or you didn't and it recovers, then writes one.
>
> There is always something to start the rollforward.
>
> So, non-issue.

I don't think so. I can imagine many cases where you want to do a
nightly tar backup without turning archiving on/off or restarting the
postmaster. In those cases, a manual checkpoint would have to be issued
before the backup begins.

Imagine a system that is up for a month, and they don't have enough
archive space to keep a months worth of WAL files. They would probably
do nightly or weekend tar backups, and then discard the WAL archives.

What procedure would they use? I assume they would copy all their old
WAL files to a save directory, issue a checkpoint, do a tar backup, then
they can delete the saved WAL files. Is that correct?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-07-16 18:32:45 Re: serverlog rotation/functions
Previous Message Peter Eisentraut 2004-07-16 17:56:25 Re: analyze.c