Re: Re: A out of date comment of WaitForWALToBecomeAvailable

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Xuneng Zhou <xunengzhou(at)gmail(dot)com>
Cc: Andy Fan <zhihuifan1213(at)163(dot)com>, 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-24 04:09:33
Message-ID: aZ0kfbUG3y0RgmhB@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lukas Fittl 2026-02-24 04:18:34 Re: Stack-based tracking of per-node WAL/buffer usage
Previous Message Chao Li 2026-02-24 04:00:05 Re: Propagate XLogFindNextRecord error to callers