Re: Re: A out of date comment of WaitForWALToBecomeAvailable

Поиск
Список
Период
Сортировка
От Xuneng Zhou
Тема Re: Re: A out of date comment of WaitForWALToBecomeAvailable
Дата
Msg-id CABPTF7UY=nCZgH836S8qmYtd5CoPQ8HjVJShjuTWrYY7oTqmYQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re:Re: A out of date comment of WaitForWALToBecomeAvailable  ("Andy Fan" <zhihuifan1213@163.com>)
Список pgsql-hackers
Hi Andy,

Thanks for the patch.

On Fri, Jan 30, 2026 at 6:23 PM Andy Fan <zhihuifan1213@163.com> wrote:
>
> At 2026-01-30 13:13:37, "Michael Paquier" <michael@paquier.xyz> wrote:
>
> Hi,
>
> >On Fri, Jan 30, 2026 at 10:29:41AM +0800, Andy Fan wrote:
> >> The following comment looks out of date now. should we fix it as following?
> >
> >Yes, the code returns XLREAD_FAIL is we cannot find a record when not
> >in standby mode.  Thanks for the report.
>
> Thanks for double check.  patch attached.
>

WaitForWALToBecomeAvailable can also return XLREAD_WOULDBLOCK when the
caller set nonblocking. The comment only talks about XLREAD_FAIL vs
“waits in standby,” so it still doesn’t describe that third outcome.
That omission pre-dates this patch, should we expand the comment
mention the nonblocking case as well?

--
Best,
Xuneng



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