On Thu, Feb 17, 2022 at 1:20 PM Kyotaro Horiguchi
<horikyota....@gmail.com> wrote:
>
> At Tue, 15 Feb 2022 20:17:20 +0530, Ashutosh Sharma <ashu.coe...@gmail.com> 
> wrote in
> > OK. The v13 patch looks good. I have marked it as ready to commit.
> > Thank you for working on all my review comments.
>
> Thaks! But the recent xlog.c refactoring crashes into this patch.
> And I found a silly bug while rebasing.
>
> xlog.c:12463 / xlogrecovery.c:3168
>                 if (!WaitForWALToBecomeAvailable(targetPagePtr + reqLen,
> ..
> {
> +                       Assert(!StandbyMode);
> ...
> +                       xlogreader->EndOfWAL = true;
>
> Yeah, I forgot about promotion there..

Yes, we exit WaitForWALToBecomeAvailable() even in standby mode
provided the user has requested for the promotion. So checking for the
!StandbyMode condition alone was not enough.

So what I should have done is
> setting EndOfWAL according to StandbyMode.
>
> +                       Assert(!StandbyMode || CheckForStandbyTrigger());
> ...
> +                       /* promotion exit is not end-of-WAL */
> +                       xlogreader->EndOfWAL = !StandbyMode;
>

The changes looks good. thanks.!

--
With Regards,
Ashutosh Sharma.


Reply via email to