Re: ATTACH PARTITION locking documentation for DEFAULT partitions

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2021-07-12T13:27:54Z
Lists: pgsql-hackers
On Tue, 13 Jul 2021 at 00:14, Matthias van de Meent
<boekewurm+postgres@gmail.com> wrote:
> Sorry for the delay. I think that  covers the basics of what I was
> missing in these docs, and although it does not cover the recursive
> 'if the check is implied by constraints don't lock this partition',
> I'd say that your suggested patch is good enough. Thanks for looking
> over this.

Isn't that covered the following?

+     <para>
+      Further locks must also be held on all sub-partitions if the table being
+      attached is itself a partitioned table.  Likewise if the default
+      partition is itself a partitioned table.  The locking of the
+      sub-partitions can be avoided by adding a <literal>CHECK</literal>
+      constraint as described in
+      <xref linkend="ddl-partitioning-declarative-maintenance"/>.
      </para>

David



Commits

  1. Doc: Clarify lock levels taken during ATTACH PARTITION