Skip to content

Commit be039d4

Browse files
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
1 parent 81bb2d2 commit be039d4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

doc/src/sgml/ref/alter_table.sgml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,13 @@ ALTER TABLE <replaceable class="PARAMETER">name</replaceable>
312312
as <literal>NOT VALID</literal>, by scanning the table to ensure there
313313
are no unmatched rows. Nothing happens if the constraint is
314314
already marked valid.
315-
The value of separating validation from initial creation of the
316-
constraint is that validation requires a lesser lock on the table
317-
than constraint creation does.
315+
</para>
316+
<para>
317+
Validation can be a long process on larger tables and currently requires
318+
an <literal>ACCESS EXCLUSIVE</literal> lock. The value of separating
319+
validation from initial creation is that you can defer validation to less
320+
busy times, or can be used to give additional time to correct pre-existing
321+
errors while preventing new errors.
318322
</para>
319323
</listitem>
320324
</varlistentry>

0 commit comments

Comments
 (0)