Re: Make mesage at end-of-recovery less scary.

Поиск
Список
Период
Сортировка
От Ashutosh Sharma
Тема Re: Make mesage at end-of-recovery less scary.
Дата
Msg-id CAE9k0P=mODNt__x=bY3KurZb4FcPuWa7DVynoykEnWms0S8Rzg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Make mesage at end-of-recovery less scary.  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Ответы Re: Make mesage at end-of-recovery less scary.  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
On Thu, Feb 17, 2022 at 1:20 PM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
>
> At Tue, 15 Feb 2022 20:17:20 +0530, Ashutosh Sharma <ashu.coek88@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.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: Timeout control within tests
Следующее
От: Ashutosh Sharma
Дата:
Сообщение: Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file