Re: Add missing error codes to PANIC/FATAL error reports in xlogrecovery

2023-12-04 Thread Krishnakumar R
Hi, Updated the patch with ERRCODE_CLUSTER_CORRUPTED & kept ERRCODE_DATA_CORRUPTED when recovery is not consistent. > > > Hm, this one arguably is not corruption, but we still cannot > > > continue. ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE or maybe a new error > > > code? Added a

Re: Add missing error codes to PANIC/FATAL error reports in xlogrecovery

2023-11-30 Thread Andres Freund
Hi, On 2023-11-30 16:02:55 -0500, Tom Lane wrote: > Andres Freund writes: > > Wondering if we should add a ERRCODE_CLUSTER_CORRUPTED for cases like this. > > We > > have ERRCODE_DATA_CORRUPTED and ERRCODE_INDEX_CORRUPTED, which make > > ERRCODE_DATA_CORRUPTED feel a bit too specific in this

Re: Add missing error codes to PANIC/FATAL error reports in xlogrecovery

2023-11-30 Thread Tom Lane
Andres Freund writes: > Wondering if we should add a ERRCODE_CLUSTER_CORRUPTED for cases like this. We > have ERRCODE_DATA_CORRUPTED and ERRCODE_INDEX_CORRUPTED, which make > ERRCODE_DATA_CORRUPTED feel a bit too specific in this kind of situation? Maybe. We didn't officially define

Re: Add missing error codes to PANIC/FATAL error reports in xlogrecovery

2023-11-30 Thread Robert Haas
On Thu, Nov 30, 2023 at 2:47 PM Andres Freund wrote: > Another aside: Isn't the hint here obsolete since we've removed exclusive > backups? I can't think of any scenario now where removing backup_label would > be correct in a non-exclusive backup. That's an extremely good point. -- Robert Haas

Re: Add missing error codes to PANIC/FATAL error reports in xlogrecovery

2023-11-30 Thread Andres Freund
Hi, On 2023-11-30 10:54:12 -0800, Krishnakumar R wrote: > diff --git a/src/backend/access/transam/xlogrecovery.c > b/src/backend/access/transam/xlogrecovery.c > index c6156a..2f50928e7e 100644 > --- a/src/backend/access/transam/xlogrecovery.c > +++ b/src/backend/access/transam/xlogrecovery.c

Add missing error codes to PANIC/FATAL error reports in xlogrecovery

2023-11-30 Thread Krishnakumar R
Hi, Please find a patch attached which adds missing sql error code in error reports which are FATAL or PANIC, in xlogrecovery. This will help with deducing patterns when looking at error reports from multiple postgres instances. -- Thanks and Regards, Krishnakumar (KK). [Microsoft] From