Re: 9.2.3 crashes during archive recovery

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Ants Aasma <ants(at)cybertec(dot)at>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: 9.2.3 crashes during archive recovery
Date: 2013-02-22 10:40:16
Message-ID: 51274B10.70400@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 22.02.2013 02:13, Michael Paquier wrote:
> On Thu, Feb 21, 2013 at 11:09 PM, Heikki Linnakangas<
> hlinnakangas(at)vmware(dot)com> wrote:
>
>> On 15.02.2013 15:49, Heikki Linnakangas wrote:
>>
>>> Attached is a patch for git master. The basic idea is to split
>>> InArchiveRecovery into two variables, InArchiveRecovery and
>>> ArchiveRecoveryRequested. ArchiveRecoveryRequested is set when
>>> recovery.conf exists. But if we don't know how far we need to recover,
>>> we first perform crash recovery with InArchiveRecovery=false. When we
>>> reach the end of WAL in pg_xlog, InArchiveRecovery is set, and we
>>> continue with normal archive recovery.
>>>
>>
>> New version of this attached, with a few bugs fixed.
>>
>> I'm thinking that this should be back-patched to 9.2, but not to earlier
>> branches. Before 9.2, we don't PANIC at a reference to a non-existent page
>> until end of recovery, even if we've already reached consistency. The same
>> basic issue still exists in earlier versions, though: if you have
>> hot_standby=on, the system will open for read-only queries too early,
>> before the database is consistent. But this patch is invasive enough that
>> I'm weary of back-patching it further, when the worst that can happen is
>> that there's a small window right after startup when you can see an
>> inconsistent database in hot standby mode. Maybe after we get some more
>> testing of this in 9.2 and master. Opinions on that?
>>
> People have not yet complained about this problem with versions prior to
> 9.1. Is it worth backpatching in this case?

Possibly not..

Anyway, I've committed this to master and 9.2 now.

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2013-02-22 10:43:39 Re: Review : Add hooks for pre- and post-processor executables for COPY and \copy
Previous Message Amit Kapila 2013-02-22 10:17:54 Re: Review : Add hooks for pre- and post-processor executables for COPY and \copy