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