mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
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
This commit is contained in:
parent
c3c86ae2af
commit
073d7cb513
@ -324,9 +324,13 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable>
|
|||||||
as <literal>NOT VALID</literal>, by scanning the table to ensure there
|
as <literal>NOT VALID</literal>, by scanning the table to ensure there
|
||||||
are no rows for which the constraint is not satisfied.
|
are no rows for which the constraint is not satisfied.
|
||||||
Nothing happens if the constraint is already marked valid.
|
Nothing happens if the constraint is already marked valid.
|
||||||
The value of separating validation from initial creation of the
|
</para>
|
||||||
constraint is that validation requires a lesser lock on the table
|
<para>
|
||||||
than constraint creation does.
|
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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
Loading…
Reference in New Issue
Block a user