From 20a562f9178b3d9118fe48950b4cf89f436ad020 Mon Sep 17 00:00:00 2001 From: Simon Riggs <simon@2ndQuadrant.com> Date: Tue, 18 Jun 2013 12:00:32 +0100 Subject: [PATCH] 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 --- doc/src/sgml/ref/alter_table.sgml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 356419e2d08..e4ef90ed9dd 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -326,9 +326,13 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> as <literal>NOT VALID</literal>, 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. + </para> + <para> + Validation can be a long process on larger tables and currently requires + an <literal>ACCESS EXCLUSIVE</literal> 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. </para> </listitem> </varlistentry> -- GitLab