From 650d623530c884c087c565f1d3b8cd76f8fe2b95 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Thu, 25 Mar 2021 16:30:22 -0300 Subject: [PATCH] Document lock obtained during partition detach MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Discussion: https://postgr.es/m/20210325180244.GA12738@alvherre.pgsql --- doc/src/sgml/ref/alter_table.sgml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 0bd0c1a5031..cd56d6a17ec 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -962,6 +962,8 @@ WITH ( MODULUS numeric_literal, 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. + SHARE lock is obtained on any tables that reference + this partitioned table in foreign key constraints. -- 2.39.5