Re: using index to speedup add not null constraints to a table - Mailing list pgsql-hackers

From Álvaro Herrera
Subject Re: using index to speedup add not null constraints to a table
Date
Msg-id 202601311716.jeczqdjsmh57@alvherre.pgsql
Whole thread Raw
In response to Re: using index to speedup add not null constraints to a table  (jian he <jian.universality@gmail.com>)
List pgsql-hackers
On 2026-Jan-16, jian he wrote:

> In this case, scanning the t3_copy_idx index to check these four NOT NULL
> constraints is actually slower than a full table scan.
> 
> Therefore, I further restricted the use of the index-scan mechanism for fast NOT
> NULL verification to scenarios where the attribute being checked is the leading
> column of the index.

Makes sense.

> I have not yet addressed all of your other comments, as this
> represents a more of a
> major change. Therefore, I am submitting the attached patch first.

OK, this means we're still waiting then.

Please do see my v8 patch.  It contained other cleanups as well.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"La gente vulgar sólo piensa en pasar el tiempo;
el que tiene talento, en aprovecharlo"



pgsql-hackers by date:

Previous
From: Sami Imseih
Date:
Subject: Re: Flush some statistics within running transactions
Next
From: Alexander Lakhin
Date:
Subject: Re: Allow GUC settings in CREATE SUBSCRIPTION CONNECTION to take effect