Re: PITR Base Backup on an idle 8.1 server

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: PITR Base Backup on an idle 8.1 server
Date: 2007-06-05 17:07:44
Message-ID: Pine.GSO.4.64.0706051247480.20255@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-06-05 17:09:46 Re: $libdir
Previous Message Scott Marlowe 2007-06-05 16:52:02 Re: Corruption of files in PostgreSQL