]> granicus.if.org Git - postgresql/commitdiff
doc: Improve CREATE COLLATION locking documentation
authorPeter Eisentraut <peter_e@gmx.net>
Mon, 30 Jul 2018 20:01:04 +0000 (22:01 +0200)
committerPeter Eisentraut <peter_e@gmx.net>
Mon, 30 Jul 2018 20:09:48 +0000 (22:09 +0200)
Move out of the concurrency control chapter, where mostly only user
table locks are discussed, and move to CREATE COLLATION reference page.

Author: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Author: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>

doc/src/sgml/mvcc.sgml
doc/src/sgml/ref/create_collation.sgml

index 24613e3c75401a79cf40f240b742d838858cd987..73934e5cf37df9797210f41cc2ff775ff61b78eb 100644 (file)
@@ -970,8 +970,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
         </para>
 
         <para>
-         Acquired by <command>CREATE COLLATION</command>,
-         <command>CREATE TRIGGER</command>, and many forms of
+         Acquired by <command>CREATE TRIGGER</command> and many forms of
          <command>ALTER TABLE</command> (see <xref linkend="sql-altertable"/>).
         </para>
        </listitem>
index 5bc9af5499e7b1a26da9a2f36aaa3a653cfe7158..038797fce116520361337c18ec17a1623047f0a6 100644 (file)
@@ -162,6 +162,13 @@ CREATE COLLATION [ IF NOT EXISTS ] <replaceable>name</replaceable> FROM <replace
  <refsect1 id="sql-createcollation-notes">
   <title>Notes</title>
 
+  <para>
+   <command>CREATE COLLATION</command> takes a <literal>SHARE ROW
+   EXCLUSIVE</literal> lock, which is self-conflicting, on the
+   <structname>pg_collation</structname> system catalog, so only one
+   <command>CREATE COLLATION</command> command can run at a time.
+  </para>
+
   <para>
    Use <command>DROP COLLATION</command> to remove user-defined collations.
   </para>