Re: 9.2.3 crashes during archive recovery

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: KONDO Mitsumasa <kondo(dot)mitsumasa(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, michael(dot)paquier(at)gmail(dot)com, ants(at)cybertec(dot)at, simon(at)2ndquadrant(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: 9.2.3 crashes during archive recovery
Date: 2013-03-06 07:50:07
Message-ID: 5136F52F.6070806@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 05.03.2013 14:09, KONDO Mitsumasa wrote:
> Hi,
>
> Horiguch's patch does not seem to record minRecoveryPoint in ReadRecord();
> Attempt patch records minRecoveryPoint.
> [crash recovery -> record minRecoveryPoint in control file -> archive
> recovery]
> I think that this is an original intention of Heikki's patch.

Yeah. That fix isn't right, though; XLogPageRead() is supposed to return
true on success, and false on error, and the patch makes it return
'true' on error, if archive recovery was requested but we're still in
crash recovery. The real issue here is that I missed the two "return
NULL;"s in ReadRecord(), so the code that I put in the
next_record_is_invalid codepath isn't run if XLogPageRead() doesn't find
the file at all. Attached patch is the proper fix for this.

> I also found a bug in latest 9.2_stable. It does not get latest timeline
> and
> recovery history file in archive recovery when master and standby
> timeline is different.

Works for me.. Can you create a test script for that? Remember to set
"recovery_target_timeline='latest'".

- Heikki

Attachment Content-Type Size
further-archive-after-crash-recovery-fix.patch text/x-diff 883 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2013-03-06 08:28:10 Re: Materialized views WIP patch
Previous Message Kyotaro HORIGUCHI 2013-03-06 05:14:22 Re: 9.2.3 crashes during archive recovery