Re: Heikki Linnakangas 2014-02-13 <52fcd02c.3060...@vmware.com> > >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.
So why does PostgreSQL then ever try to archive something from the old timeline? Isn't overwriting files on the old timeline just a very bad idea in general? If so, it shouldn't be the responsibility of archive_command to prevent this, but the server shouldn't be trying that in the first place. > You could perhaps use "diff" as part of archive_command, to check if > archived version is identical to the one about to be archived. Well, if that makes it into the default postgresql.conf (and docs)... Otoh, it's still not nice that this could still be an archive command that fails, i.e. requires admin intervention before archiving can proceed. Mit freundlichen Grüßen, Christoph Berg -- Senior Berater, Tel.: +49 (0)21 61 / 46 43-187 credativ GmbH, HRB Mönchengladbach 12080, USt-ID-Nummer: DE204566209 Hohenzollernstr. 133, 41061 Mönchengladbach Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer pgp fingerprint: 5C48 FE61 57F4 9179 5970 87C6 4C5A 6BAB 12D2 A7AE
signature.asc
Description: Digital signature