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

From: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: kksrcv001(at)gmail(dot)com, Andres Freund <andres(at)anarazel(dot)de>
Subject: Add missing error codes to PANIC/FATAL error reports in xlog.c and relcache.c
Date: 2023-12-06 13:03:57
Message-ID: CAN55FZ1k8LgLEqncPGmz_fWnrobV6bjABOTH4tOWta6xNcPQig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
v1-0001-xlog.c-Add-missing-error-codes-to-PANIC-FATAL-err.patch application/octet-stream 15.0 KB
v1-0002-relcache.c-Add-missing-error-codes-to-PANIC-FATAL.patch application/octet-stream 2.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey M. Borodin 2023-12-06 13:05:48 Re: Transaction timeout
Previous Message Zhijie Hou (Fujitsu) 2023-12-06 12:55:29 Forbid the use of invalidated physical slots in streaming replication.