Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

From: Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints
Date: 2025-03-11 10:15:46
Message-ID: CAGPqQf31ctDvcbJE7J3in++iCRbf7-Rv07F7dpnu-_GyLWFz+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 10, 2025 at 5:20 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
wrote:

> On 2025-Mar-10, Rushabh Lathia wrote:
>
> > I adjusted the set_attnotnull() API and removed the added
> > queue_validation parameter. Rather, the function start using wqueue
> > input parameter as a check.
> > If wqueue is NULL, skip the queue_validation. Attaching patch here,
> > but not sure how clear it is, in term of understanding the API. Your
> > thoughts/inputs?
>
> Yeah, I think this makes sense, if it supports all the cases correctly.
> (If in your code you have any calls of set_attnotnull that pass a NULL
> wqueue during ALTER TABLE in order to avoid queueing a check, you had
> better have comments to explain this.)
>

Done.

>
> Kindly do not send patches standalone, because the CFbot doesn't
> understand that it needs to apply it on top of the three previous
> patches. You need to send all 4 patches every time. You can see the
> result here:
> https://commitfest.postgresql.org/patch/5554/
> If you click on the "need rebase!" label you'll see that it tried to
> apply patch 0004 to the top of the master branch, and that obviously
> failed. (FWIW if you click on the "summary" label you'll also see that
> the patch has been failing the CI tests since Feb 27.)
>

Sure, attaching the rebased patch here.

>
> > Looking further for AdjustNotNullInheritance() I don't see need of
> > rename this API as it's just adding new error check now for an
> > existing NOT NULL constraint.
>
> OK.
>
> > JFYI, I can reproduce the failure Ashutosh Bapat reported, while
> > running the pg_upgrade test through meson commands. I am
> > investigating that further.
>
> Ah good, thanks.
>

Somehow, I am now not able to reproduce after the clean build. Yesterday
I was able to reproduce, so I was happy, but again trying to analyze the
issue
when I start with the

Thanks,
Rushabh Lathia
www.EnterpriseDB.com

Attachment Content-Type Size
0002-Support-NOT-VALID-and-VALIDATE-CONSTRAINT-for-named-.patch application/octet-stream 47.8 KB
0001-Convert-pg_attribut.attnotnull-to-char-type.patch application/octet-stream 19.6 KB
0003-Documentation-changes.patch application/octet-stream 3.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2025-03-11 10:20:02 Re: Statistics Import and Export: difference in statistics dumped
Previous Message Kirill Reshke 2025-03-11 10:03:34 Re: protocol support for labels