Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNpcV-0001jp-BN for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Oct 2020 03:51:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kNpcU-0007b4-9f for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Oct 2020 03:51:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNpcU-0007aw-33 for pgsql-hackers@lists.postgresql.org; Thu, 01 Oct 2020 03:51:02 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNpcR-00015u-Sd for pgsql-hackers@lists.postgresql.org; Thu, 01 Oct 2020 03:51:01 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 35C8C9BA; Wed, 30 Sep 2020 23:50:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 30 Sep 2020 23:50:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=lS/TGKPxX891zaSex4X5Zf0sPwp KrirsaFsmEUutdUY=; b=1DnMtYxFOIkcR3wFR0+SgoyHTHeC7l+nDkz+disUG2S 3i9pmGmoLmutRhq319iK3Cd8W9ZVmQnI23iB/XAWrvYx9pfbOKJM2XlU4q4bXn68 ErIyk+fR7YMfEIxjS4p8y8pPU0cAZWw7uwB6AhURYG3t4BaFc6ZpCJfzHR/j7pFD IwCYFwM52P8Ax8FA1QfLq+aQ4X+w7Z49zLEuUkSyNtUD8PcBbaedWOmZ6RQeJFMa 7Ki8O0G+tChR6Y+RbugZCBEllva1A+VS2ElJcnLl8s609dKmIlcN3DdFoFIAB1mE Esk/JlJR/y11RIubrMntldYvYOGqZf0wDpXjfq2qtrw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=lS/TGK PxX891zaSex4X5Zf0sPwpKrirsaFsmEUutdUY=; b=P0WfoFWAHoKJVbf2iTjWmM SBAyxGK1CiOUZig/6MxazQXBS1y95abDSCdSMIuGblR2+X+Quutp1KS7QkMGG9DN PY7yELuPjX/m+nNIehw93Zxm9yQGostneylmI0+L/83KnxQrINnkXpa/wBSC2A+m 8quz2HSJng2oxm7YarKBKo+g461FnB7k/mqludtscs7NEUfnppj8Zhtodhw8TYz/ LqmbtboKy7rsjJKD7tFpgrc8ETQaWp8x0OLNIVj48TLD0NVkVo/K/SunYoCflQqb sFQXsNg02KAVN+dLPZPMtBjuCqsBFq/ibvRnjSN5rE02toHb5mT2aHrRE1KkOU+Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrfeefgdejkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvdegudeuhfdtueeltedtveejheeh ieevueeigeelteegleejleeiueeiheegvefhnecukfhppeduuddurddutddvrddukedtrd dukeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep mhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 797FC3064680; Wed, 30 Sep 2020 23:50:56 -0400 (EDT) Date: Thu, 1 Oct 2020 12:50:39 +0900 From: Michael Paquier To: Amit Langote Cc: Alvaro Herrera , Pg Hackers Subject: Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY Message-ID: <20201001035039.GD8130@paquier.xyz> References: <20200923152321.GA26342@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="g7w8+K/95kPelPD2" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --g7w8+K/95kPelPD2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 24, 2020 at 12:51:52PM +0900, Amit Langote wrote: > Also, I noticed that looking up a parent's partitions via > RelationBuildPartitionDesc or directly will inspect inhdetached to > include or exclude partitions, but checking if a child table is a > partition of a given parent table via get_partition_parent doesn't. > Now if you fix get_partition_parent() to also take into account > inhdetached, for example, to return InvalidOid if true, then the > callers would need to not consider the child table a valid partition. > So, RelationGetPartitionQual() on a detached partition should actually > return NIL, making my earlier claim about not needing the defensive > CHECK constraint invalid. But maybe that's fine if all places agree > on a detached partition not being a valid partition anymore? It would be good to get that answered, and while on it please note that the patch needs a rebase. -- Michael --g7w8+K/95kPelPD2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl91Ug8ACgkQnvQgOdby QH35ZQ/+KyWG25qzByy3wF411Xq/p7CkJm+4IWH3pPcPl1Vxn4dL4I2W1kOsuMUm OKHwIwxRBEJ9aqHDZsEhHTJg7FRzmGTZZtkIiDEPNzY+vScnIHqPFtRmCCP8bbb6 UxpoN8I0SphC9g6vcqkHjZz4jDtwOzABPXZ7Yot0XU9oAoUrhhoejGvp8KaC74I6 d0S6IjVUc9JAGFtN8Ouz5YYyFOW5Ty74PlJ2UwDSLkPZ1hsRTFcb0A70d6uEqQKy 5pL7ahk1/HXqwNK+MZuIET41oO45L3yQiXVBUGXsFDAieQM50NdAcH44CuMDDCey Nuz8F4JfGtsTPFbYZgmxnWV8679aU6KWKogAwXcv+Z92acCljx6YhmYyKQJGbSEn VMFmKYIqesw2moEv5xuB1jBs3uj7mUCCjz4owuEtsfN0QTGXZegBUoED0VU8U1aD ATpQfFm7yvRRqcvjAHnjuF8hm117LGDL1bLdkQdpeAQZnyxpb0NM1CV1997TagOt 3DODUaqAk3fjZNwwKeUVUFYssQhLmpbeWfAjIoQa+hIAfeJNomMM8kPiTbcDKtQB +IVINgA6YFfiBCM88YIr/jh+C8YSueFzWymfhtdHbGv/WsGjyc6yPrZZwoGtlWWg wAgKX6uJwjqbiicj4adGdWQRAzAXby0y5lBvzBq6lHWChibSgL0= =KYIH -----END PGP SIGNATURE----- --g7w8+K/95kPelPD2--