From: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
---|---|
To: | Christoph Berg <christoph(dot)berg(at)credativ(dot)de>, Josh Berkus <josh(at)agliodbs(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [BUG] Archive recovery failure on 9.3+. |
Date: | 2014-02-13 13:36:00 |
Message-ID: | 52FCCA40.3060908@vmware.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 02/13/2014 02:42 PM, Christoph Berg wrote:
> Re: Heikki Linnakangas 2014-02-13 <52FC9468(dot)4050602(at)vmware(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | knizhnik | 2014-02-13 13:38:20 | Re: Memory ordering issue in LWLockRelease, WakeupWaiters, WALInsertSlotRelease |
Previous Message | David Beck | 2014-02-13 12:53:56 | Re: New hook after raw parsing, before analyze |