Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita666d28

Browse files
committed
Add note that TRUNCATE uses an access exclusive lock. This apparently
surprised/confused some users.
1 parente05c5a9 commita666d28

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎doc/src/sgml/ref/truncate.sgml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/truncate.sgml,v 1.30 2008/11/14 10:22:47 petere Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/truncate.sgml,v 1.31 2008/12/18 10:45:00 petere Exp $
33
PostgreSQL documentation
44
-->
55

@@ -102,6 +102,13 @@ TRUNCATE [ TABLE ] <replaceable class="PARAMETER">name</replaceable> [, ... ]
102102
to truncate it.
103103
</para>
104104

105+
<para>
106+
<command>TRUNCATE</> acquires an access exclusive lock on the
107+
tables in operates on, which blocks all other concurrent operations
108+
on the table. If concurrent access to a table is required, then
109+
the <command>DELETE</> command should be used instead.
110+
</para>
111+
105112
<para>
106113
<command>TRUNCATE</> cannot be used on a table that has foreign-key
107114
references from other tables, unless all such tables are also truncated

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp