Re: 9.2.3 crashes during archive recovery - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: 9.2.3 crashes during archive recovery
Date
Msg-id 5136F52F.6070806@vmware.com
Whole thread Raw
In response to Re: 9.2.3 crashes during archive recovery  (KONDO Mitsumasa <kondo.mitsumasa@lab.ntt.co.jp>)
Responses Re: 9.2.3 crashes during archive recovery
List 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

pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: 9.2.3 crashes during archive recovery
Next
From: Simon Riggs
Date:
Subject: Re: Materialized views WIP patch