Restructure ALTER TABLE notes to clarify table rewrites and verification scans - Mailing list pgsql-hackers

From James Coleman
Subject Restructure ALTER TABLE notes to clarify table rewrites and verification scans
Date
Msg-id CAAaqYe9SnwE6j7WL4zuWJ9oR0c7Jgf6CgL12z4G=eMmVjwzbcQ@mail.gmail.com
Whole thread Raw
Responses Re: Restructure ALTER TABLE notes to clarify table rewrites and verification scans  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
Re: Restructure ALTER TABLE notes to clarify table rewrites and verification scans  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
Over in the "Document atthasmissing default optimization avoids
verification table scan" thread David Johnston (who I've cc'd)
suggested that my goals might be better implemented with a simple
restructuring of the Notes section of the ALTER TABLE docs. I think
this is also along the lines of Tom Lane's suggestion of a "unified
discussion", but I've chosen for now (and simplicity's sake) not to
break this into an entirely new page. If reviewers feel that is
warranted at this stage, I can do that, but it seems to me that for
now this improves the structure and sets us up for such a future page
but falls short of sufficient content to move into its own page.

One question on the changes: the current docs say "when attaching a
new partition it may be scanned to verify that existing rows meet the
partition constraint". The word "may" there seems to suggest there may
also be occasions where scans are not needed, but no examples of such
cases are present. I'm not immediately aware of such a case. Are these
constraints always validated? If not, in which cases can such a scan
be skipped?

I've also incorporated the slight correction in "Correct docs re:
rewriting indexes when table rewrite is skipped" [2] here, and will
rebase this patch if that gets committed.

Thanks,
James Coleman

1: https://www.postgresql.org/message-id/CAKFQuwZyBaJjNepdTM3kO8PLaCpRdRd8%2BmtLT8QdE73oAsGv8Q%40mail.gmail.com
2: https://www.postgresql.org/message-id/CAAaqYe90Ea3RG%3DA7H-ONvTcx549-oQhp07BrHErwM%3DAyH2ximg%40mail.gmail.com

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pgsql: Add 'basebackup_to_shell' contrib module.
Next
From: Peter Eisentraut
Date:
Subject: Re: Frontend error logging style