From: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | michael(at)paquier(dot)xyz |
Cc: | cyberdemn(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org, alvherre(at)2ndquadrant(dot)com, 9erthalion6(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #15346: Replica fails to start after the crash |
Date: | 2018-08-31 05:52:06 |
Message-ID: | 20180831.145206.05203037.horiguchi.kyotaro@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
At Thu, 30 Aug 2018 18:48:55 -0700, Michael Paquier <michael(at)paquier(dot)xyz> wrote in <20180831014855(dot)GJ15446(at)paquier(dot)xyz>
> On Fri, Aug 31, 2018 at 09:48:46AM +0900, Kyotaro HORIGUCHI wrote:
> > Please wait a bit.. I have a concern about this.
>
> Sure, please feel free.
Thanks.
I looked though the patch and related code and have a concern.
The patch inhibits turning off updateMinRecoveryPoint on other
than the startup process running crash-recovery except at the end
of XLogNeedsFlush.
> /*
> * Check minRecoveryPoint for any other process than the startup
> * process doing crash recovery, which should not update the control
> * file value if crash recovery is still running.
> */
> if (XLogRecPtrIsInvalid(minRecoveryPoint))
> updateMinRecoveryPoint = false;
Even if any other processes than the startup calls the function
during crash recovery, they don't have a means to turn on
updateMinRecoveryPoint again. Actually the only process that
calls the function druing crash recovery is the startup. bwriter
and checkpointer doesn't. Hot-standby backends come after
crash-recvery ends. After all, we just won't have an invalid
minRecoveryPoint value there, and updateMinRecoverypoint must be
true.
Other than that I didn't find a problem. Please find the attached
patch. I also have not come up with how to check the case
automatically..
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
min-consistent-update-v3.patch | text/x-patch | 2.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-08-31 06:23:54 | Re: BUG #15346: Replica fails to start after the crash |
Previous Message | Michael Paquier | 2018-08-31 01:48:55 | Re: BUG #15346: Replica fails to start after the crash |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-08-31 06:23:54 | Re: BUG #15346: Replica fails to start after the crash |
Previous Message | Masahiko Sawada | 2018-08-31 05:03:48 | Re: Copy function for logical replication slots |