From b05283ae4a8243bddb7bd68def6f36cd4b6e5081 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 18 Dec 2008 10:45:00 +0000 Subject: [PATCH] Add note that TRUNCATE uses an access exclusive lock. This apparently surprised/confused some users. --- doc/src/sgml/ref/truncate.sgml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/src/sgml/ref/truncate.sgml b/doc/src/sgml/ref/truncate.sgml index cae4af4593..d05bbec861 100644 --- a/doc/src/sgml/ref/truncate.sgml +++ b/doc/src/sgml/ref/truncate.sgml @@ -102,6 +102,13 @@ TRUNCATE [ TABLE ] name [, ... ] to truncate it. + + 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 DELETE command should be used instead. + + TRUNCATE cannot be used on a table that has foreign-key references from other tables, unless all such tables are also truncated -- 2.39.5