Re: Propagate XLogFindNextRecord error to callers

From: Mircea Cadariu <cadariu(dot)mircea(at)gmail(dot)com>
To: Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Japin Li <japinli(at)hotmail(dot)com>
Subject: Re: Propagate XLogFindNextRecord error to callers
Date: 2026-02-09 12:15:34
Message-ID: a121b735-70f5-49d9-8774-22a465008545@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Anthonin,

Thanks for the updated patch.

I have noticed this code added in XLogFindNextRecord in the patch,
appears also in XLogNextRecord (line 334).

> + if (state->errormsg_deferred)
> + {
> + if (state->errormsg_buf[0] != '\0')
> + *errormsg = state->errormsg_buf;
> + state->errormsg_deferred = false;
> + }
> +

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?

A nit for the commit message: Propage -> Propagate

--
Thanks,
Mircea Cadariu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2026-02-09 12:19:07 Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions
Previous Message Shinya Kato 2026-02-09 12:07:03 Re: Use pg_current_xact_id() instead of deprecated txid_current()