Improve error context after some failed XLogReadRecord() - Mailing list pgsql-hackers

From Michael Paquier
Subject Improve error context after some failed XLogReadRecord()
Date
Msg-id YYnTH6OyOwQcAdkw@paquier.xyz
Whole thread Raw
Responses Re: Improve error context after some failed XLogReadRecord()
List pgsql-hackers
Hi all,

I have noticed $subject while looking at a patch in this area:
https://www.postgresql.org/message-id/YYiqxtEqhgb5gIWL@paquier.xyz

While we don't expect the four callers of XLogReadRecord() related to
logical decoding to fail in the code paths changed by the patch
attached, I think that it would be good to provide more context to
users rather than just emitting an elog(ERROR) coming directly from
the WAL reader.  This way, it becomes a bit easier to guess from where
the failure is coming.

A patch is attached to improve all those elog()s.  I have tried not to
be too fancy about those new error strings, but I am sure that these
could be tweaked.

Thoughts?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.
Next
From: Peter Smith
Date:
Subject: Re: Added schema level support for publication.