Re: [BUG] Archive recovery failure on 9.3+.
От | Heikki Linnakangas |
---|---|
Тема | Re: [BUG] Archive recovery failure on 9.3+. |
Дата | |
Msg-id | 52FCCA40.3060908@vmware.com обсуждение исходный текст |
Ответ на | Re: [BUG] Archive recovery failure on 9.3+. (Christoph Berg <christoph.berg@credativ.de>) |
Ответы |
Re: [BUG] Archive recovery failure on 9.3+.
|
Список | pgsql-hackers |
On 02/13/2014 02:42 PM, Christoph Berg wrote: > Re: Heikki Linnakangas 2014-02-13 <52FC9468.4050602@vmware.com> >>> With 9.1, it works, but 9.2 and 9.3 don't archive anything until I >>> remove the "test ! -f" part. (An alternative fix would be to declare >>> the behavior ok and adjust that example in the config.) >> >> Hmm, the behavior is the same in 9.1 and 9.2. Did you use a >> different archive_command in 9.1, without the "test"? > > The behavior is different: 9.1 doesn't try to re-archive the last > segment from the old timeline. (I've seen it always happen in training > workshops, so that's always mostly idle machines. Possibly 9.1 will > re-archive the last segment under load.) > > I've just reproduced it here with these settings (in Debian's > /etc/postgresql-common/createcluster.conf syntax): Ah, I think I see what's going on. 9.2 changed the archive recovery behavior so that the restored WAL segments are copied into pg_xlog, so that you can recover the standby back to the same point after restart, even if the archive later stops working (also needed for cascading standbys). In 9.1, we only attempted to archive the last segment from previous timeline if it wasn't restored from archive. In 9.2, it's always archived. I was testing this with streaming replication; 9.1 and 9.2 behave the same in that scenario. But they differ when doing archive recovery. Is this an argument for back-patching the "don't archive last segment from old timeline" patch to 9.2 and 9.3, but leaving 9.1 alone? You have the same problem with 9.1 and streaming replication, but no-one's complained.. - Heikki
В списке pgsql-hackers по дате отправления: