summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2008-12-18 10:45:00 +0000
committerPeter Eisentraut <peter_e@gmx.net>2008-12-18 10:45:00 +0000
commita666d28543f81cc0a5f4b8a4b378957432610111 (patch)
tree05aa9c0157ab17ef18996b9d07a33e147b8585ac /doc
parente05c5a908b5064591fea201ff161e8b6aae3ebd1 (diff)
downloadpostgresql-a666d28543f81cc0a5f4b8a4b378957432610111.tar.gz
Add note that TRUNCATE uses an access exclusive lock. This apparently
surprised/confused some users.
Diffstat (limited to 'doc')
-rw-r--r--doc/src/sgml/ref/truncate.sgml9
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/truncate.sgml b/doc/src/sgml/ref/truncate.sgml
index 03a6685908..d765c1bd8c 100644
--- a/doc/src/sgml/ref/truncate.sgml
+++ b/doc/src/sgml/ref/truncate.sgml
@@ -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
-->
@@ -103,6 +103,13 @@ TRUNCATE [ TABLE ] <replaceable class="PARAMETER">name</replaceable> [, ... ]
</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>
<command>TRUNCATE</> cannot be used on a table that has foreign-key
references from other tables, unless all such tables are also truncated
in the same command. Checking validity in such cases would require table