ATTACH/DETACH partitions and locking

Pavel Luzanov <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.documentation
Message-ID <[email protected]>
Hello,

According to patch[1] and after playing with v12 beta1 I think that this 
item can be dropped from "5.11.3. Implementation Using Inheritance" 
section of v12 docs:

"Some operations require a stronger lock when using declarative 
partitioning than when using table inheritance. For example, adding or 
removing a partition to or from a partitioned table requires taking an 
ACCESS EXCLUSIVE lock on the parent table, whereas a SHARE UPDATE 
EXCLUSIVE lock is enough in the case of regular inheritance."

Small patch attached.


[1] ATTACH/DETACH PARTITION CONCURRENTLY
https://www.postgresql.org/message-id/flat/CAKJS1f9QjUwQrio20Pi=yCHmnouf4z3SfN8sqXaAcwREG6k0zQ@mail.gmail.com

-- 

-----
Pavel Luzanov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
ddlsgml.patch (text/x-patch, 810 B)
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index ed2d9c60d5..f9feec3125 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -4057,17 +4057,6 @@ ALTER INDEX measurement_city_id_logdate_key
         might be poor.)
        </para>
       </listitem>
-
-      <listitem>
-       <para>
-        Some operations require a stronger lock when using declarative
-        partitioning than when using table inheritance.  For example, adding
-        or removing a partition to or from a partitioned table requires taking
-        an <literal>ACCESS EXCLUSIVE</literal> lock on the parent table,
-        whereas a <literal>SHARE UPDATE EXCLUSIVE</literal> lock is enough
-        in the case of regular inheritance.
-       </para>
-      </listitem>
      </itemizedlist>
     </para>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.