Document atthasmissing default optimization avoids verification table scan

From: James Coleman <jtc331(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Document atthasmissing default optimization avoids verification table scan
Date: 2021-09-24 14:30:39
Message-ID: CAAaqYe8EgO-f_MAz3PyyeeK=20U-GG4+WtM-Q5qcn0XOvuR5Qg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

When PG11 added the ability for ALTER TABLE ADD COLUMN to set a constant
default value without rewriting the table the doc changes did not note
how the new feature interplayed with ADD COLUMN DEFAULT NOT NULL.
Previously such a new column required a verification table scan to
ensure no values were null. That scan happens under an exclusive lock on
the table, so it can have a meaningful impact on database "accessible
uptime".

I've attached a patch to document that the new mechanism also
precludes that scan.

Thanks,
James Coleman

Attachment Content-Type Size
v1-0001-Document-atthasmissing-default-avoids-verificatio.patch application/octet-stream 1.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2021-09-24 14:58:52 Re: pg_upgrade test for binary compatibility of core data types
Previous Message Justin Pryzby 2021-09-24 14:22:32 Re: error_severity of brin work item