From: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | masao(dot)fujii(at)gmail(dot)com |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [BUG] Checkpointer on hot standby runs without looking checkpoint_segments |
Date: | 2012-04-17 06:50:46 |
Message-ID: | 20120417.155046.246184384.horiguchi.kyotaro@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
This is new version of the patch.
I replaced GetStandbyFlushRecPtr with GetXLogReplayRecPtr to
check progress of checkpoint following Fujii's sugestion.
The first one is for 9.2dev, and the second is 9.1.3 backported version.
===
By the way, I took a close look around there,
> I agree with it basically. But I've get confused to look into
> GetStandbyFlushRecPtr().
>
> | if (XLByteLT(receivePtr, replayPtr))
> | return XLByteLT(replayPtr, restorePtr) ? restorePtr : replayPtr;
> | else
> | return XLByteLT(receivePtr, restorePtr) ? restorePtr : receivePtr;
- receivePtr seems always updated just after syncing received xlog.
- replayPtr is updated just BEFORE xlog_redo operation, and
- restorePtr is updated AFTER xlog_redo().
- And, replayPtr seems not exceeds receivePtr.
These seems quite reasonable. These conditions make following
conditional expression.
restorePtr <= replayPtr <= receivePtr
But XLByteLT(recievePtr, replayPtr) this should not return true
under the condition above.. Something wrong in my assumption?
Anyway, I understand here that you say the location returned by
GetXLogReplayRecPtr() is always flushed.
--
Kyotaro Horiguchi
NTT Open Source Software Center
== My e-mail address has been changed since Apr. 1, 2012.
Attachment | Content-Type | Size |
---|---|---|
standby_checkpoint_segments_9.2dev_fix_20120417.patch | text/x-patch | 2.4 KB |
standby_checkpoint_segments_9.1.3_fix_20120417.patch | text/x-patch | 2.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2012-04-17 07:12:41 | Re: Why can't I use pgxs to build a plpgsql plugin? |
Previous Message | Heikki Linnakangas | 2012-04-17 06:36:04 | Re: Why can't I use pgxs to build a plpgsql plugin? |