Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hbOca-0006uF-68 for pgsql-docs@arkaria.postgresql.org; Thu, 13 Jun 2019 12:14:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hbOcY-0003Ql-EZ for pgsql-docs@arkaria.postgresql.org; Thu, 13 Jun 2019 12:14:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hbOcY-0003Qe-3f for pgsql-docs@lists.postgresql.org; Thu, 13 Jun 2019 12:14:22 +0000 Received: from cyclops.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hbOcR-00032D-0j for pgsql-docs@lists.postgresql.org; Thu, 13 Jun 2019 12:14:21 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 8D5CC21C239D for ; Thu, 13 Jun 2019 15:14:13 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from [192.168.27.175] (gw.postgrespro.ru [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 625F121C230E for ; Thu, 13 Jun 2019 15:14:13 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1560428053; bh=h1FubBWV2GB9lO7i1JWnYfL4m0OJlM9NnnqrwjMmbCY=; h=To:From:Subject:Date; b=qXSY2I/H1yV63RhbHgspxgiVtaCNvrczv8hwn68+WG/YN1HW8DjZh6DaHbjQwxwko 7onZc51bRyupG6FjkrexKe9A+8RaXfPme/Tpa2+HbqbXQ6hJjsIB1pCWCj7tLHDdfN HQP6ynjB9x4gXENFQIXSOtCM1Xn0g2g1ESga+ktQ= To: pgsql-docs@lists.postgresql.org From: Pavel Luzanov Subject: ATTACH/DETACH partitions and locking Message-ID: <642e9fbc-b832-698b-9a8f-d626afd7014d@postgrespro.ru> Date: Thu, 13 Jun 2019 15:14:13 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1BAA3CDF09A00E0A3C398996" Content-Language: ru-RU List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------1BAA3CDF09A00E0A3C398996 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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." Small patch attached. [1] ATTACH/DETACH PARTITION CONCURRENTLY https://www.postgresql.org/message-id/flat/CAKJS1f9QjUwQrio20Pi=yCHmnouf4z3SfN8sqXaAcwREG6k0zQ@mail.gmail.com -- ----- Pavel Luzanov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company --------------1BAA3CDF09A00E0A3C398996 Content-Type: text/x-patch; name="ddlsgml.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ddlsgml.patch" diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index ed2d9c60d5..f9feec3125 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -4057,17 +4057,6 @@ ALTER INDEX measurement_city_id_logdate_key might be poor.) - - - - 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. - - --------------1BAA3CDF09A00E0A3C398996--