Add missing error codes to PANIC/FATAL error reports in xlog.c and relcache.c

Nazir Bilal Yavuz <byavuz81@gmail.com>

From: Nazir Bilal Yavuz <byavuz81@gmail.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: kksrcv001@gmail.com, Andres Freund <andres@anarazel.de>
Date: 2023-12-06T13:03:57Z
Lists: pgsql-hackers

Attachments

Hi,

There is an ongoing thread [1] for adding missing SQL error codes to
PANIC and FATAL error reports in xlogrecovery.c file. I did the same
but for xlog.c and relcache.c files.

I couldn't find a suitable error code for the "cache lookup failed for
relation" error in relcache.c and this error comes up in many places.
Would it be reasonable to create a new error code specifically for
this?

Any kind of feedback would be appreciated.

[1] https://www.postgresql.org/message-id/CAPMWgZ8g17Myb5ZRE5aTNowUohafk4j48mZ_5_Zn9JnR5p2u0w%40mail.gmail.com

-- 
Regards,
Nazir Bilal Yavuz
Microsoft

Commits

  1. Add error codes to some PANIC/FATAL errors reports