public inbox for [email protected]  
help / color / mirror / Atom feed
From: MauMau <[email protected]>
To: Kevin Grittner <[email protected]>
To: Josh Berkus <[email protected]>
To: [email protected]
Subject: Re: Sample archive_command is still problematic
Date: Tue, 12 Aug 2014 07:23:41 +0900
Message-ID: <0F73426A2EA544878BCAC33BB989D671@maumau> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-docs>

From: "Kevin Grittner" <[email protected]>
The problem with the recommended command is that cp is not atomic.
The file can be read before the contents are materialized, causing
early end to recovery. I have seen it happen. The right way to do
this is to copy to a different name or directory and mv the file
into place once it is complete -- or use software which does that
automatically, like rsync does.


I submitted a patch a patch for this a few months ago, which is pg_copy 
listed in the current CF.  The patch also addresses the problem that the 
archived file can get lost after power failure because it is not flushed to 
disk.    The patch consists of a program called pg_copy which can be used 
instead of cp/copy, and a doc fix to suggest using mv.  I made it following 
the favorable suggestions from people.

Regards
MauMau



-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



view thread (25+ messages)  latest in thread

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], [email protected]
  Subject: Re: Sample archive_command is still problematic
  In-Reply-To: <0F73426A2EA544878BCAC33BB989D671@maumau>

* 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