Re: [BUG] Archive recovery failure on 9.3+.

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: [BUG] Archive recovery failure on 9.3+.
Дата
Msg-id 52FCD37C.3070806@vmware.com
обсуждение исходный текст
Ответ на Re: [BUG] Archive recovery failure on 9.3+.  (Christoph Berg <christoph.berg@credativ.de>)
Список pgsql-hackers
On 02/13/2014 04:07 PM, Christoph Berg wrote:
> 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?

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christoph Berg
Дата:
Сообщение: Re: [BUG] Archive recovery failure on 9.3+.
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Terminating pg_basebackup background streamer