Re: using index to speedup add not null constraints to a table

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: using index to speedup add not null constraints to a table
Date: 2026-02-04 06:27:03
Message-ID: CACJufxFeGeGPRo75-TywDLbo3Oj3BQMk+yna6ydAHSjHK5jNqA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi.

Please check the attached v10.

Turns out regress test is doable, I just need to
SET client_min_messages TO DEBUG1;

It is now implemented as a single static function, index_check_notnull, located
in tablecmd.c. I believe I have addressed all of your other points as well.

--
jian
https://www.enterprisedb.com/

Attachment Content-Type Size
v10-0001-using-indexscan-to-speedup-add-not-null-constraints.patch text/x-patch 20.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michał Kłeczek 2026-02-04 07:13:11 Re: New access method for b-tree.
Previous Message Peter Smith 2026-02-04 06:26:25 Re: Warn when creating or enabling a subscription with max_logical_replication_workers = 0