pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pavel Luzanov <p.luzanov@postgrespro.ru>
To: pgsql-docs@lists.postgresql.org
Subject: ATTACH/DETACH partitions and locking
Date: Thu, 13 Jun 2019 15:14:13 +0300
Message-ID: <642e9fbc-b832-698b-9a8f-d626afd7014d@postgrespro.ru> (raw)

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....

-- 

-----
Pavel Luzanov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachments:

  [text/x-patch] ddlsgml.patch (809B, ../642e9fbc-b832-698b-9a8f-d626afd7014d@postgrespro.ru/2-ddlsgml.patch)
  download | inline diff:
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>
 

view thread (4+ messages)  latest in thread

Message-ID: <642e9fbc-b832-698b-9a8f-d626afd7014d@postgrespro.ru>
Permalink:  ../642e9fbc-b832-698b-9a8f-d626afd7014d@postgrespro.ru/
Also on:    postgresql.org/message-id/642e9fbc-b832-698b-9a8f-d626afd7014d@postgrespro.ru

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: p.luzanov@postgrespro.ru, pgsql-docs@lists.postgresql.org
  Subject: Re: ATTACH/DETACH partitions and locking
  In-Reply-To: <642e9fbc-b832-698b-9a8f-d626afd7014d@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox