Document lock obtained during partition detach
authorAlvaro Herrera <[email protected]>
Thu, 25 Mar 2021 19:30:22 +0000 (16:30 -0300)
committerAlvaro Herrera <[email protected]>
Thu, 25 Mar 2021 19:30:22 +0000 (16:30 -0300)
On partition detach, we acquire a SHARE lock on all tables that
reference the partitioned table that we're detaching a partition from,
but failed to document this fact.  My oversight in commit f56f8f8da6af.
Repair.  Backpatch to 12.

Author: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/20210325180244[email protected]

doc/src/sgml/ref/alter_table.sgml

index 0bd0c1a5031d31fa0aaa8dad73a864ad83af13e4..cd56d6a17ec5a859727a11671cb814f63e44543e 100644 (file)
@@ -962,6 +962,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       ties to the table from which it was detached.  Any indexes that were
       attached to the target table's indexes are detached.  Any triggers that
       were created as clones of those in the target table are removed.
+      <literal>SHARE</literal> lock is obtained on any tables that reference
+      this partitioned table in foreign key constraints.
      </para>
     </listitem>
    </varlistentry>