On 02/13/2014 04:07 PM, Christoph Berg wrote:
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?

Yes.

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.

Totally agreed. That's why I'm proposing that we stop doing that :-).

It's been a bad idea from day one, but I'm a bit hesitent to back-patch until someone actually complains. There has been subtle changes to archive recovery behavior in each release, so I'm worried that the old behavior was in fact useful to someone in some corner case that we're missing.

- Heikki


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to