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

From Christoph Berg
Subject Re: [BUG] Archive recovery failure on 9.3+.
Date
Msg-id 20140213140701.GD25703@msgid.credativ.de
Whole thread Raw
In response to Re: [BUG] Archive recovery failure on 9.3+.  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: [BUG] Archive recovery failure on 9.3+.  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
Re: Heikki Linnakangas 2014-02-13 <52FCD02C.3060201@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

pgsql-hackers by date:

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