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-11 12:15:56
Message-ID: bbe64b8a-e61a-4779-a242-eae3e6d2d1f2@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/02/2026 10:43, Anthonin Bonnefoy wrote:

> XLogReadRecord may already have consumed errormsg_deferred and set
> errormsg. We can't set it to NULL, or that would erase a valid error
Indeed. Should we place this initialisation at the top of
XLogFindNextRecord, before any processing? At that point, there's
nothing to erase.

> + /*
> + * we may have reported errors due to invalid WAL header, propagate the
> + * error message to the caller.
> + */

You can consider capitalising.

--
Thanks,
Mircea Cadariu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Soumya S Murali 2026-02-11 12:18:39 Re: Fix gistkillitems & add regression test to microvacuum
Previous Message Amit Kapila 2026-02-11 12:09:37 Re: [PATCH] Add max_logical_replication_slots GUC