mirror of
https://github.com/postgres/postgres.git
synced 2025-05-08 07:21:33 +03:00
Add note that TRUNCATE uses an access exclusive lock. This apparently
surprised/confused some users.
This commit is contained in:
parent
e05c5a908b
commit
a666d28543
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$PostgreSQL: pgsql/doc/src/sgml/ref/truncate.sgml,v 1.30 2008/11/14 10:22:47 petere Exp $
|
$PostgreSQL: pgsql/doc/src/sgml/ref/truncate.sgml,v 1.31 2008/12/18 10:45:00 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -102,6 +102,13 @@ TRUNCATE [ TABLE ] <replaceable class="PARAMETER">name</replaceable> [, ... ]
|
|||||||
to truncate it.
|
to truncate it.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<command>TRUNCATE</> acquires an access exclusive lock on the
|
||||||
|
tables in operates on, which blocks all other concurrent operations
|
||||||
|
on the table. If concurrent access to a table is required, then
|
||||||
|
the <command>DELETE</> command should be used instead.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<command>TRUNCATE</> cannot be used on a table that has foreign-key
|
<command>TRUNCATE</> cannot be used on a table that has foreign-key
|
||||||
references from other tables, unless all such tables are also truncated
|
references from other tables, unless all such tables are also truncated
|
||||||
|
Loading…
x
Reference in New Issue
Block a user