public inbox for [email protected]  
help / color / mirror / Atom feed
From: Frank Wiles <[email protected]>
To: Tom Lane <[email protected]>
Cc: [email protected]
Subject: Re: wal shipping/pg_standby docs patch
Date: Thu, 26 Mar 2009 11:08:50 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

On Wed, Mar 25, 2009 at 9:04 PM, Tom Lane <[email protected]> wrote:
> Frank Wiles <[email protected]> writes:
>> Attached is a patch that makes the suggestion be 'rsync -avr' in both
>> backup.sgml and pg_standby.sgml.
>
> Seems to me the first question to ask is exactly why you got "bit" by
> cp.  I doubt that rsync will provide a magic answer.
>
>                        regards, tom lane

Hi Tom,

Using the example in the docs in both places suggests using cp to copy
to your archive location, which isn't atomic.  This leaves open the
possibility of transferring to your warm standby server part of a WAL
file.  In my case I was using rsync in cron to pull from the "master"
onto the warm standby server.  Ran fine for 3 days, then I transferred
a 14MB and a 8.2MB WAL file.  Basically being unlucky and transferring
it at just the wrong time.

This obviously hosed the warm standby and I had to go through the
whole backup procedure again.  Using rsync, as it is atomic, prevents
this.

-- 
Frank Wiles
Revolution Systems | http://www.revsys.com/
[email protected]   | (800) 647-6298




view thread (3+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: wal shipping/pg_standby docs patch
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox