| From: | Xuneng Zhou <xunengzhou(at)gmail(dot)com> |
|---|---|
| To: | Andy Fan <zhihuifan1213(at)163(dot)com> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)lists(dot)postgresql(dot)org, thomas(dot)munro(at)gmail(dot)com |
| Subject: | Re: Re: A out of date comment of WaitForWALToBecomeAvailable |
| Date: | 2026-02-02 02:37:43 |
| Message-ID: | CABPTF7UY=nCZgH836S8qmYtd5CoPQ8HjVJShjuTWrYY7oTqmYQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Andy,
Thanks for the patch.
On Fri, Jan 30, 2026 at 6:23 PM Andy Fan <zhihuifan1213(at)163(dot)com> wrote:
>
> At 2026-01-30 13:13:37, "Michael Paquier" <michael(at)paquier(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-02-02 02:41:07 | Re: relkind as an enum |
| Previous Message | Xuneng Zhou | 2026-02-02 02:28:05 | Re: Wake up backends immediately when sync standbys decrease |