Re: Re: A out of date comment of WaitForWALToBecomeAvailable - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Re: A out of date comment of WaitForWALToBecomeAvailable
Date
Msg-id aZ0kfbUG3y0RgmhB@paquier.xyz
Whole thread Raw
In response to Re: Re: A out of date comment of WaitForWALToBecomeAvailable  (Xuneng Zhou <xunengzhou@gmail.com>)
Responses Re: A out of date comment of WaitForWALToBecomeAvailable
List pgsql-hackers
On Mon, Feb 02, 2026 at 10:37:43AM +0800, Xuneng Zhou wrote:
> 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?

The outcome related to XLREAD_WOULDBLOCK is implied in the last
sentence of the comment block standing at the top of the function,
which seems OK to me.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Propagate XLogFindNextRecord error to callers
Next
From: Lukas Fittl
Date:
Subject: Re: Stack-based tracking of per-node WAL/buffer usage