From: Simon Riggs Date: Tue, 18 Jun 2013 11:10:10 +0000 (+0100) Subject: Fix docs on lock level for ALTER TABLE VALIDATE X-Git-Tag: REL9_3_BETA2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0ae1bf8c1be7eccc54792a9c211345f97a11f78e;p=postgresql Fix docs on lock level for ALTER TABLE VALIDATE ALTER TABLE .. VALIDATE CONSTRAINT previously gave incorrect details about lock levels and therefore incomplete reasons to use the option. Initial bug report and fix from Marko Tiikkaja Reworded by me to include comments by Kevin Grittner --- diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 5437626c3f..7ee0aa8ca0 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -324,9 +324,13 @@ ALTER TABLE [ IF EXISTS ] name as NOT VALID, by scanning the table to ensure there are no rows for which the constraint is not satisfied. Nothing happens if the constraint is already marked valid. - The value of separating validation from initial creation of the - constraint is that validation requires a lesser lock on the table - than constraint creation does. + + + Validation can be a long process on larger tables and currently requires + an ACCESS EXCLUSIVE lock. The value of separating + validation from initial creation is that you can defer validation to less + busy times, or can be used to give additional time to correct pre-existing + errors while preventing new errors.