Re: BUG: pg_class.relchecks overflow, making table undroppable - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: BUG: pg_class.relchecks overflow, making table undroppable
Date
Msg-id armRHds2MDhCUD2N@paquier.xyz
Whole thread
In response to Re: BUG: pg_class.relchecks overflow, making table undroppable  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
List pgsql-hackers
On Fri, Sep 25, 2026 at 02:33:57PM +0200, Matthias van de Meent wrote:
> Also done.  Thanks for the fast replies.
>
> Attached v3:
>
> * Add errcode(PROGRAM_LIMIT_EXCEEDED) to the ereports.
> * Use pg_add_s16_overflow() to detect the overflows.
>     This includes changing the type of local numchecks variables to
> int16. SetRelationNumChecks's signature is unchanged.
> *  Move the overflow checks to before StoreRelCheck.
>     This saves one dirty tuple in catalog tables when that overflow happens.

That looks pretty good here, so applied and backpatched as the
consequences of keeping an overflowed counter can be really annoying.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Midhush Karthic
Date:
Subject: [PATCH] Add target-column context for assignment coercion errors
Next
From: Chao Li
Date:
Subject: Re: WAL segment file descriptor leak on read errors can PANIC the server