Re: Point in Time Recovery - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Point in Time Recovery
Date
Msg-id 3013.1090292051@sss.pgh.pa.us
Whole thread Raw
In response to Re: Point in Time Recovery  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: Point in Time Recovery  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-hackers
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
>>> Hang on, are you supposed to MOVE or COPY away WAL segments?
>> 
>> COPY.  The checkpoint code will then delete or recycle the segment file,
>> as appropriate.

> So what happens if you just move it?  Postgres breaks?

I don't think so, but it seems like a much less robust way to do things.
What happens if you have a failure partway through?  For instance
archive machine dies and loses recent data right after you've rm'd the
source file.  The recommended COPY procedure at least provides some
breathing room between when you install the data on the archive and when
the original file is removed.

It's not like you save any effort by using a MOVE anyway.  You're not
going to have the archive on the same machine as the database (or if you
are, you ain't gonna be *my* DBA ...)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Point in Time Recovery
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: Point in Time Recovery