Re: Document atthasmissing default optimization avoids verification table scan - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Document atthasmissing default optimization avoids verification table scan
Date
Msg-id c29fe365-4f11-bd0f-083b-8820712927a0@dunslane.net
Whole thread Raw
In response to Re: Document atthasmissing default optimization avoids verification table scan  (James Coleman <jtc331@gmail.com>)
Responses Re: Document atthasmissing default optimization avoids verification table scan
Re: Document atthasmissing default optimization avoids verification table scan
List pgsql-hackers
On 1/21/22 13:55, James Coleman wrote:
> On Thu, Jan 20, 2022 at 3:43 PM James Coleman <jtc331@gmail.com> wrote:
>> As noted earlier I expect to be posting an updated patch soon.
> Here's the updated series. In 0001 I've moved the documentation tweak
> into the ALTER TABLE notes section. In 0002 I've taken David J's
> suggestion of shortening the "Tip" on the DDL page and mostly using it
> to point people to the Notes section on the ALTER TABLE page.


I don't really like the first part of patch 1, but as it gets removed by
patch 2 we can move past that.


+     Before <productname>PostgreSQL</productname> 11, adding a new
column to a
+     table required rewriting that table, making it a very slow operation.
+     More recent versions can sometimes optimize away this rewrite and
related
+     validation scans.  See the notes in <command>ALTER TABLE</command>
for details.


I know what it's replacing refers to release 11, but let's stop doing
that. How about something like this?

    Adding a new column can sometimes require rewriting the table,
    making it a very slow operation. However in many cases this rewrite
    and related verification scans can be optimized away by using an
    appropriate default value. See the notes in <command>ALTER
    TABLE</command> for details.

cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Parallelize correlated subqueries that execute within each worker
Next
From: Andrew Dunstan
Date:
Subject: Re: A test for replay of regression tests