From: | KONDO Mitsumasa <kondo(dot)mitsumasa(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | hlinnakangas(at)vmware(dot)com, 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-05 12:09:53 |
Message-ID: | 5135E091.6060706@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
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.
Best regards,
(2013/03/05 18:22), Kyotaro HORIGUCHI wrote:
> Hello, I could cause the behavior and might understand the cause.
>
> The head of origin/REL9_2_STABLE shows the behavior I metioned in
> the last message when using the shell script attached. 9.3dev
> runs as expected.
>
> In XLogPageRead, when RecPtr goes beyond the last page, the
> current xlog file is released and new page requested.
>
> The variables were as below at the point.
>
> StandbyRequested == true
> StandbyMode == false
> ArchiveRecoveryRequested == true
> InArchiveRecovery == false
>
> In this case, XLogPageRead immediately returns NULL before trying
> to get xlogs via streaming nor from archive. So ReadRecord
> returns NULL, then unexpectedly exits 'main redo apply loop' and
> increases timeline ID as if it were promoted.
>
> This seems fiexed by letting it try all requested
> sources. Attached patch does it and the test script runs as
> expected.
>
>> We found that PostgreSQL with this patch unexpctedly becomes
>> primary when starting up as standby. We'll do further
>> investigation for the behavior.
>>
>>>> Anyway, I've committed this to master and 9.2 now.
>>>
>>> This seems to fix the issue. We'll examine this further.
>
> regards,
>
>
>
>
--
Mitsumasa KONDO
NTT OSS Center
Attachment | Content-Type | Size |
---|---|---|
crash-archive-recovery9.2_stable.patch | text/x-diff | 642 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2013-03-05 12:15:55 | Re: Materialized views WIP patch |
Previous Message | Kyotaro HORIGUCHI | 2013-03-05 10:53:10 | Re: 9.2.3 crashes during archive recovery |