On Mon, Feb 9, 2026 at 1:15 PM Mircea Cadariu <[email protected]> wrote:
> In XLogNextRecord, right before the above code, we do *errormsg = NULL. 
> Should this be done also in XLogFindNextRecord in the patch?
>
> If so, what about even extracting a helper method which will be called from 
> both places?

XLogReadRecord may already have consumed errormsg_deferred and set
errormsg. We can't set it to NULL, or that would erase a valid error
message.

A simplification would have been to remove processing the deferred
error processing from XLogNextRecord and leave it to
XLogFindNextRecord, but there are some calls to XLogNextRecord (like
in xlogprefetcher.c), so being able to get the error message when
calling XLogNextRecord is necessary.

> A nit for the commit message: Propage -> Propagate

Fixed

Attachment: v4-0001-Propagate-errormsg-to-XLogFindNextRecord-caller.patch
Description: Binary data

Reply via email to