Re: Fast promotion failure - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Re: Fast promotion failure
Date
Msg-id 20130510.173655.159816643.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
In response to Re: Fast promotion failure  (Amit Kapila <amit.kapila@huawei.com>)
Responses Re: Fast promotion failure  (Amit Kapila <amit.kapila@huawei.com>)
List pgsql-hackers
Thank you for noticing me of that. 

> It seems to me, it is the same problem as discussed and fixed in below
> thread.
> http://www.postgresql.org/message-id/51894942.4080500@vmware.com
> 
> Could you try with fixes given by heikki.

The first one settles the timeline transition problem for the
present. Besides, I have no longer found any recovery failure
except unrepeatable one shown below.

> C 2013-05-10 15:30:29.589 JST 9242 LOG:  restarted WAL streaming at 0/5000000 on timeline 2
> B 2013-05-10 15:30:33.789 JST 9233 LOG:  restartpoint complete: (snip.)
> B 2013-05-10 15:30:33.789 JST 9233 LOG:  recovery restart point at 0/3000028
> B 2013-05-10 15:30:33.789 JST 9233 LOG:  checkpoint starting:
> C 2013-05-10 15:32:32.170 JST 9242 FATAL:  could not receive data from WAL stream: 

I'm get confused, the patch seems to me ensureing the "first
checkpoint after fast promotion is performed" to use the
"correct, new, ThisTimeLineID".

At Thu, 9 May 2013 11:10:23 +0530, Amit Kapila <amit.kapila@huawei.com> wrote in
<005501ce4c77$b45f0b70$1d1d2250$@kapila@huawei.com>
> Without fast-promotion, it will request/perform End of Recovery checkpoint
> while still in recovery (before setting xlogctl->SharedRecoveryInProgress),
> So I think before any new operation can start, it can make sure that
> Checkpoint with new timeline is performed.
> 
> However with fast promotion, the request for checkpoint is done after
> recovery; so some operations can happen before checkpoint with new timeline.
> I think it can so happen that last checkpoint is with old timeline and there
> are operations with new timeline which might have caused the problem Heikki
> has seen.

I don't see any problem (in my view :) that something writes WAL
runs before the first checkpoint starts - as described in the
comment just above the checkpoint request..

regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: amul sul
Date:
Subject: psql connection reset failed
Next
From: Simon Riggs
Date:
Subject: Concurrent HOT Update interference