Doc: Clarify locks taken when using ALTER TABLE ATTACH PARTITION
authorMichael Paquier
Tue, 5 Nov 2019 01:32:43 +0000 (10:32 +0900)
committerMichael Paquier
Tue, 5 Nov 2019 01:32:43 +0000 (10:32 +0900)
Since 898e5e32, this command uses partially ShareUpdateExclusiveLock,
but the docs did not get the call.

Author: Justin Pryzby
Reviewed-by: Amit Langote, Álvaro Herrera, Michael Paquier
Discussion: https://postgr.es/m/20191028001207[email protected]
Backpatch-through: 12

doc/src/sgml/ref/alter_table.sgml

index f86de7a4ac776584507c1ec72eb08ce73a3eac8e..44bbfe790e68d68b999276c02a89672153d6dee9 100644 (file)
@@ -901,6 +901,13 @@ WITH ( MODULUS numeric_literal, REM
       the scan of the new partition, it is always skipped when the default
       partition is a foreign table.
      
+
+     
+      Attaching a partition acquires a
+      SHARE UPDATE EXCLUSIVE lock on the parent table,
+      in addition to ACCESS EXCLUSIVE locks on the table
+      to be attached and on the default partition (if any).
+