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.92) (envelope-from ) id 1j78xW-0005lH-M0 for pgsql-bugs@arkaria.postgresql.org; Thu, 27 Feb 2020 02:31:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j78xV-00012p-7q for pgsql-bugs@arkaria.postgresql.org; Thu, 27 Feb 2020 02:31:29 +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 1j78xU-000115-Vm for pgsql-bugs@lists.postgresql.org; Thu, 27 Feb 2020 02:31:29 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j78xS-0006cU-R2 for pgsql-bugs@lists.postgresql.org; Thu, 27 Feb 2020 02:31:28 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 2505E21D6E; Wed, 26 Feb 2020 21:31:25 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 26 Feb 2020 21:31:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=DbCxFp1N1BPXB8SvyzZApcRtSko j0nhOBktLweW/CvY=; b=S2WZ6uRslhYFqYr7VDgdgNDx3UmICemE9/lTF0M/hOA gsfr4AIaZgZIin/hCWwxQyC0uyNzxtvz8i1OLymPFC2fsimd+GXr7/lp81eOJHv3 v/xqN1HUJ2SQI/JDSryb2miP6IezlJZD+XE/n61p96LI3ro/0wTG2XvyyuBNqx61 ks8Es+moiNxN2ipmiKltBzIUx/sl6yVjz+ks49P636kP72t4ARoQTUIQh6sS7hXh TP+xBBOvjcICZAYBR0Ke8+vm1DigRCz+xX4eylJTlkEf0XCgIiCLDvE7jKCmDEe/ Y9hYh/blmbTL3CedkApuPK3KdjT8xSQ8OomjAnwIWOw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm2; bh=DbCxFp 1N1BPXB8SvyzZApcRtSkoj0nhOBktLweW/CvY=; b=Eb4BWCYrkhb8y2BYJBBpkp U0xxmNY8m1l2gSo3PwWueZaqp2tnVye9TzDiiBbs89chGroqO6QRvicseAIdDL0k tkLAXIaGbAYH5SmCw1u+2D6p6zft4ifHPE5SSlvvFS0Ge/EVsdpVSYjCKhz71MQy POswuSUm0pEgEo5EFRj6eCC41iLFQ/iD4274jCEvxRRWx9kDnAQMYmxM7aYyb3pC w9he/Xh3Iy04pAs3X+4yrLBA6fdF4b0OB2kzydlJLLQF8suIhSnERFisrfbnAP1R OzsvCyGmMQUnEt2zdIRn86vtkjT21lbcwXG5x3L+ezdTaMs+IWcqXyiWA5aiy3lA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrleehgdehtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdejtddmnecujfgurhepfffhvf fukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhi vghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecukfhppeduudekrddvge durddvgeekrdegvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (mp76f1f82a.ap.nuro.jp [118.241.248.42]) by mail.messagingengine.com (Postfix) with ESMTPA id 962FE3280062; Wed, 26 Feb 2020 21:31:23 -0500 (EST) Date: Thu, 27 Feb 2020 11:31:20 +0900 From: Michael Paquier To: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16276: Server crash on an invalid attempt to attach a partition to an index Message-ID: <20200227023120.GC1969@paquier.xyz> References: <16276-5cd1dcc8fb8be7b5@postgresql.org> <20200226080624.GH17153@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+xNpyl7Qekk2NvDX" Content-Disposition: inline In-Reply-To: <20200226080624.GH17153@paquier.xyz> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --+xNpyl7Qekk2NvDX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Feb 26, 2020 at 05:06:24PM +0900, Michael Paquier wrote: > Attempting to attach a table to a partitioned index? Nice thought. > Without the assertion, RangeVarCallbackForAttachIndex complains that > the relation is not an index, which is right, so I would be tempted to > just remove the culprit assertion. Any thoughts? FWIW, one can note that ALTER TABLE ATTACH PARTITION with indexes correctly registers partition indexes without partition bounds in pg_class, even if the grammar cannot accept ALTER TABLE without any bounds defined: create table idxpart(a int) partition by list (a); create table idxpart1 partition of idxpart for values in (1); create index idxpart_idx on only idxpart(a); create index idxpart1_idx on only idxpart1(a); alter table idxpart_idx attach partition idxpart1_idx for values in (0); So I would rather not issue an error in that case on compatibility ground. -- Michael --+xNpyl7Qekk2NvDX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl5XKfgACgkQnvQgOdby QH2ZgA//S2PErOC6Jm1uHNg3uZzc8PKrG/cQI6cvybLXmWk2DeC//5Cpq9CloUGr 88gLdCIUYb2YguKstK5v1WMDXpeofEM3wqkxHWOnej17jMGtXU/mJCJVJcTDm0D4 fraly3hzx/1dLexj/k256XThUZ2XdrJXu6lFrW6IsOna3UIif2jS5txWOyqysnlq BHe3Bq9gCB+yWRG5ayf8qPhA5I8eN6q0aqbRU8SZKqSg8sUyD0Bghgr3HIVDAYLN fHpFwtYMfcY0sASvRdVmxEbUyRSMUH4IxHGWBL9Mt3ELhbJpAPbvieCY5RFGT1cV krRY6pKyjc9TSc3dgT4ScT9tUkF+FxQD6cVL7THWttam2LZ76/I18h7JvRqSOjUM fQ68viAtIn7hLYwpVZmTARI0NmHVM0U9G2Pj3cju+H0bdu5RZD/SiV1GvrNCIvlA pRIz3LQFex4QAhPsvK0MWW+iLqzvHliflvFYdsGcm+4W+TOnGaWNMgUIvHkC/ApG XKHFxxdO0V9Knqi8AFzabJZC2ftC0c2eLVaEOI5bCctz74HBaDSq0ZwYhi65DpVV jKUeXbeQs3oZTJp8VblwhR6nwucbP+yryd6ueta5YH7NmYe4L56S1j3DuH42R3iq T6j+3LtFSTDu2arlfNXCe6VBW5zH0h6VFAF1QbIpJt7EWg6WmyA= =HQj/ -----END PGP SIGNATURE----- --+xNpyl7Qekk2NvDX--