pgsql-hackers
❮
A out of date comment of WaitForWALToBecomeAvailable
- Jump to comment-1Andy Fan<zhihuifan1213@163.com>Jan 30, 2026, 2:30 AM UTCHi,
The following comment looks out of date now. should we fix it as following?
- * If the record is not immediately available, the function returns false*
+ * If the record is not immediately available, the function returns XLREAD_FAIL
..* if we're not in standby mode. In standby mode, waits for it to become * available. *
static XLogPageReadResult
WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess, ..)
Thanks- Jump to comment-1Michael Paquier<michael@paquier.xyz>Jan 30, 2026, 5:13 AM UTCOn 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.
--
Michael- Jump to comment-1Andy Fan<zhihuifan1213@163.com>Jan 30, 2026, 10:24 AM UTCAt 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?
Thanks for double check. patch attached.
Yes, the code returns XLREAD_FAIL is we cannot find a record when not
in standby mode. Thanks for the report.