Re: [BUG] Archive recovery failure on 9.3+. - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: [BUG] Archive recovery failure on 9.3+.
Date
Msg-id 52FCD02C.3060201@vmware.com
Whole thread Raw
In response to Re: [BUG] Archive recovery failure on 9.3+.  (Christoph Berg <christoph.berg@credativ.de>)
Responses Re: [BUG] Archive recovery failure on 9.3+.  (Christoph Berg <christoph.berg@credativ.de>)
List pgsql-hackers
On 02/13/2014 03:53 PM, Christoph Berg wrote:
> Is removing the "test ! -f" part and hence overwriting files in the
> archive safe, i.e. are the files the same?

No. Not in general, anyway. If the old master keeps running, even for a 
moment, after the partial file was copied, it will have created more WAL 
records which are present in the old master's copy of the segment, but 
not in the standby's.

You could perhaps use "diff" as part of archive_command, to check if 
archived version is identical to the one about to be archived.

- Heikki



pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: [BUG] Archive recovery failure on 9.3+.
Next
From: Noah Misch
Date:
Subject: Re: Weaker shmem interlock w/o postmaster.pid