Add error codes to some PANIC/FATAL errors reports

Daniel Gustafsson <dgustafsson@postgresql.org>

Commit: 226261f387fd8b44420ad03298ef09d83571f9b1
Author: Daniel Gustafsson <dgustafsson@postgresql.org>
Date: 2024-04-03T07:19:25Z
Releases: 17.0
Add error codes to some PANIC/FATAL errors reports

This adds errcodes to a set of PANIC and FATAL errors in xlog.c
and relcache.c,  which previously had no errcode at all set, in
order to make fleetwide analysis of errorlogs easier. There are
many more ereport/elogs left which could benefit from having an
errcode but this at least makes a dent in the issue.

Author: Nazir Bilal Yavuz <byavuz81@gmail.com>
Discussion: https://postgr.es/m/CAN55FZ1k8LgLEqncPGmz_fWnrobV6bjABOTH4tOWta6xNcPQig@mail.gmail.com

Files

PathChange+/−
src/backend/access/transam/xlog.c modified +52 −25
src/backend/utils/cache/relcache.c modified +19 −7

Discussion