Re: Seeking datacenter PITR backup suggestions - Mailing list pgsql-general

From Decibel!
Subject Re: Seeking datacenter PITR backup suggestions
Date
Msg-id 20070829020425.GU1386@nasby.net
Whole thread Raw
In response to Re: Seeking datacenter PITR backup suggestions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Seeking datacenter PITR backup suggestions  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-general
On Tue, Aug 28, 2007 at 09:54:23PM -0400, Tom Lane wrote:
> Decibel! <decibel@decibel.org> writes:
> > On Tue, Aug 28, 2007 at 08:31:10PM +0100, Gregory Stark wrote:
> >> Postgres tries to reuse WAL files. Once the archive_command completes it
> >> believes it is safe to reuse the old file without deleting it. That will do
> >> nasty things if you've used ln as your archive command.
>
> > I thought that was specifically disabled when PITR was enabled? Or do we
> > just do a rename rather than an unlink ond creating a new file?
>
> No.  The only difference is we don't recycle the file until the
> archive_command says it's done with it.
>
> The archive_command must actually physically copy the data someplace
> else, and must not return success until it's sure the copy is good.
> Perhaps the docs are not sufficiently clear on the point?

Yeah... I think that's a big gotcha waiting to smack someone. I'd
actually make the mention <strong> so that hopefully no one can miss
it... or do we have an official method for putting warnings in the docs?

"Because WAL segment files are renamed and not re-created from scratch,
it is critical that the archive command actually copy files, not move
or hard-link them."
--
Decibel!, aka Jim Nasby                        decibel@decibel.org
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)

Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Seeking datacenter PITR backup suggestions
Next
From: Ron Johnson
Date:
Subject: Re: Is there a better way to do this?