diff options
Diffstat (limited to 'doc/src/sgml/ref/alter_table.sgml')
-rw-r--r-- | doc/src/sgml/ref/alter_table.sgml | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 4e082eaa637..e3e81ba9d76 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -822,7 +822,8 @@ ALTER TABLE <replaceable class="PARAMETER">name</replaceable> <para> Adding a <literal>CHECK</> or <literal>NOT NULL</> constraint requires - scanning the table to verify that existing rows meet the constraint. + scanning the table to verify that existing rows meet the constraint, + but does not require a table rewrite. </para> <para> @@ -844,11 +845,17 @@ ALTER TABLE <replaceable class="PARAMETER">name</replaceable> </para> <para> - To force an immediate rewrite of the table, you can use - <link linkend="SQL-VACUUM">VACUUM FULL</>, <xref linkend="SQL-CLUSTER"> - or one of the forms of ALTER TABLE that forces a rewrite. This results in - no semantically-visible change in the table, but gets rid of - no-longer-useful data. + To force immediate reclamation of space occupied by a dropped column, + you can execute one of the forms of <command>ALTER TABLE</> that + performs a rewrite of the whole table. This results in reconstructing + each row with the dropped column replaced by a null value. + </para> + + <para> + The rewriting forms of <command>ALTER TABLE</> are not MVCC-safe. + After a table rewrite, the table will appear empty to concurrent + transactions, if they are using a snapshot taken before the rewrite + occurred. See <xref linkend="mvcc-caveats"> for more details. </para> <para> |