pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Pavel Luzanov <p.luzanov@postgrespro.ru>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: ATTACH/DETACH partitions and locking
Date: Thu, 13 Jun 2019 16:07:20 -0400
Message-ID: <20190613200720.GA18557@alvherre.pgsql> (raw)
In-Reply-To: <642e9fbc-b832-698b-9a8f-d626afd7014d@postgrespro.ru>

On 2019-Jun-13, Pavel Luzanov wrote:

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

Hmm ... while you're correct that ALTER TABLE ATTACH PARTITION no longer
uses AccessExclusive lock, ALTER TABLE DETACH PARTITION continues to.
So we could remove the "adding to" bit of the paragraph, but not remove
it completely.

https://www.postgresql.org/message-id/CA%2BTgmoY13KQZF-%3DHNTrt9UYWYx3_oYOQpu9ioNT49jGgiDpUEA%40mail...

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (4+ messages)  latest in thread

Message-ID: <20190613200720.GA18557@alvherre.pgsql>
Permalink:  ../20190613200720.GA18557@alvherre.pgsql/
Also on:    postgresql.org/message-id/20190613200720.GA18557@alvherre.pgsql

 · 

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: alvherre@2ndquadrant.com, p.luzanov@postgrespro.ru, pgsql-docs@lists.postgresql.org
  Subject: Re: ATTACH/DETACH partitions and locking
  In-Reply-To: <20190613200720.GA18557@alvherre.pgsql>

* 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