Re: PITR Base Backup on an idle 8.1 server - Mailing list pgsql-general

From Greg Smith
Subject Re: PITR Base Backup on an idle 8.1 server
Date
Msg-id Pine.GSO.4.64.0706051247480.20255@westnet.com
Whole thread Raw
In response to Re: PITR Base Backup on an idle 8.1 server  (Marco Colombo <pgsql@esiway.net>)
Responses Re: PITR Base Backup on an idle 8.1 server  (Marco Colombo <pgsql@esiway.net>)
List pgsql-general
On Tue, 5 Jun 2007, Marco Colombo wrote:

> AFAIK, files in pg_xlog are first renamed (and only if and after the
> archive_command returned true) and later overwritten to. Never deleted.

No, they get deleted sometimes, too.  Not often, but it can happen under
heavy load if more segments get temporarily created than are normally
needed.  At checkpoint time, only 2*checkpoint_segments+1 xlog files are
kept; if there are more than that, they are removed.  Probably never
happen on your system from what you've described of it, but it is a
possibility.

As Simon just pointed out, the danger with the approach you're taken comes
from what happens if a checkpoint occurs in the middle of your backup.
You've probably never seen that happen either.  As long as that continues
to be true, you might be OK for now, but you really need to get to where
you're following the recommended procedure rather than trying to do
something a little different.  There are too many edge cases here that
could^H^H^H^H^Hwill bite you one day.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Corruption of files in PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: $libdir