From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | James Coleman <jtc331(at)gmail(dot)com>, "Bossart, Nathan" <bossartn(at)amazon(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Document atthasmissing default optimization avoids verification table scan |
Date: | 2022-01-21 21:34:52 |
Message-ID: | CAKFQuwbzYj2QZQAcquHH+S7YWxsNU0r6EiNZVW7JTBBvycU6BA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 21, 2022 at 2:08 PM Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> On 1/21/22 13:55, James Coleman wrote:
>
> + 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.
>
I think it is a virtue, and am supported in that feeling by the existing
wording, to be explicit about the release before which these optimizations
can not happen. The docs generally use this to good effect without
overdoing it. This is a prime example.
The combined effect of "sometimes", "in many", "can be", and "an
appropriate" make this version harder to read than it probably needs to
be. I like the patch as-is over this; but I would want to give an
alternative wording more thought if it is insisted upon that mention of
PostgreSQL 11 goes away.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2022-01-21 21:42:24 | fairywren is generating bogus BASE_BACKUP commands |
Previous Message | Andrew Dunstan | 2022-01-21 21:22:05 | Re: A test for replay of regression tests |