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 1hBzv3-0005GI-SN for pgsql-bugs@arkaria.postgresql.org; Thu, 04 Apr 2019 10:48: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 1hBzv2-0002Mk-IH for pgsql-bugs@arkaria.postgresql.org; Thu, 04 Apr 2019 10:48:28 +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 1hBzv2-0002Md-B0 for pgsql-bugs@lists.postgresql.org; Thu, 04 Apr 2019 10:48:28 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBzv0-0006UP-4P for pgsql-bugs@lists.postgresql.org; Thu, 04 Apr 2019 10:48:27 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id E2A5D395C; Thu, 4 Apr 2019 06:48:23 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 04 Apr 2019 06:48:24 -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=fm1; bh=E19veLq4tVw18hW7OBA2oAOldTk qaCBoLWhbN51YYoE=; b=XS4ZYYkMcA+Px437jt6Ks+vPjizAD8Dst0jVqyeE8VD 4YwI0vGBD5kmmDGcpUAz1Gnwe34G278D2A8vMFWd+jyoX0KQYY/TBAK5i1OK9sK6 qLB8hA4kzaecbJZ3WXKndhK5n34tigXkVTIyqoaBkWIg3G3EoxUP2pcBSTnyBoP4 HnYrqJ+IOAkGHqrGDIVpQD5ayfeaxYv+/MikYlx08Hm/QvL1YPjcvkzwiUSmoVWh YohsVRNBwoLMJ+/Rs9QQVbhE5BYj++vg0ejpAMgwPxOUdMiHWrfyKmmXtN4zlZ89 XIr8Ypwh9gNhhpKgIu/MXeI+9IkMulO9uaYBTHZ4KTw== 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=fm2; bh=E19veL q4tVw18hW7OBA2oAOldTkqaCBoLWhbN51YYoE=; b=BvtEMwhBzo9OXqRWQSm9uo u7uaTQcGPOSO4ZQHObXbDTo/w+8tp4MQmqD9AKoF8gcowRC7he9QVuGblMN/1Wbn ed7gBTa1sm2cv5q1rxJeai1JxWJT+uw4y42zlBnhl3rj41v5B4MRkG3D4i0YAmV2 Qg3FJzO/4DXuJ0dR9gpMI3MpjVRgL3vuATSWFVer0cDQx3abZCl4zs/JPx4Nljvj cTlRmCQtJgiR7TZDdvgYZTVcaSF/BqAQQw4ArZwAUe5EFVUxbbiYiUe0MPFMSu1h lC2C/8IfVHcMBWlyc3lsAX0fByhTHR+ubxoAEjHQrlBAaSLZxpg1V/aCosn48Zew == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrtdehgdefvdculddtuddrgedutddrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenfghrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhf gggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruc eomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecukfhppeduuddurddutddvrddu kedtrddukeehnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquh hivghrrdighiiinecuvehluhhsthgvrhfuihiivgeptd 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 4B621E460B; Thu, 4 Apr 2019 06:48:21 -0400 (EDT) Date: Thu, 4 Apr 2019 19:48:18 +0900 From: Michael Paquier To: Amit Langote Cc: petr.fedorov@phystech.edu, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15733: An insert destined at partition created after a column has been dropped from the parent table fails Message-ID: <20190404104818.GM7693@paquier.xyz> References: <15733-7692379e310b80ec@postgresql.org> <20190404013510.GB7693@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DITGHUV3p5DjDsXt" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --DITGHUV3p5DjDsXt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 04, 2019 at 07:31:09PM +0900, Amit Langote wrote: > The problem seems to be present only in PG 11; not in PG 10 and HEAD, as > Michael already said. >=20 > It seems to have been introduced by 34295b87f in PG 11, wherein the > decision of when to add a tuple to an intermediate parent's dedicated > tuple routing slot is mistakenly getting mixed with the decision of > whether tuple conversion is required between the parent of the previous > level and the current parent. We didn't catch that error back then, > because we only tried up to 2 levels of partitioning, whereas the test > case presented here uses 3 levels of partitioning. In the reported test > case, the 1st level needs tuple conversion (between partitioned and > partitioned_2), but the next level does not (between partitioned_2 and > partitioned_2_1), so the slot used when routing through partitioned_2_1 to > the last level doesn't contain a tuple to extract the partition key from, > hence the error. Perhaps it would make sense to have this test case on HEAD as well? It seems to me that there is little point in having a completely new set of relations to test this issue knowing that multi-level partitioning is already tested in the same file. Why not extending the part close to "more tests for certain multi-level partitioning scenarios" in insert.sql with a mlparted111 or such a thing? This way, we have a three-layer partitioning and the error can be equally triggered. -- Michael --DITGHUV3p5DjDsXt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlyl4PIACgkQnvQgOdby QH3yNA//Rehb2DbA/ku424BTmZjTQBHa5p8Z1M0vpw505vOiegl+RBxzcVqVXv5S anhW0VFFV5ztuCMFEeZ8P+9n/57gi8k295Pcqo0yJaqEnTym0WOHIIBHaXRtoWnv x5ZkU2JLLXI+cJ45xremQ3Su38gT0m1Z24u/he6CbpqVjGUSgO0SqpEMLok5NOJ5 2O59SyB1KXQh6DgyE/A5qi1pWLS58exFqt0VVT0exGzOlEyH2V7tNTBqsOCjTw6H /j7rHkClhWoIQWI0e+9holipgYWLwNrEjHP+BNeFzj69Ib3GFdo1wpNIZu0WqhV7 iWnOOV2gWDJMn9kuRoI4e8/MduWrBWOoDJ1jT6a+yyjORfgI1gRncfNPMBfP7emR y0U+j+M+sGHOUK564DzMA60NoyG5qXPwCNpCE2hBO6RbcROdc/S9BAiF7pwGgbet uYZ22XDy+eJfyR/8auoItiIueG325BnOGZZtKD+0KfMBg68KOWXImNIN5ob9b9Yr W/ZnrVT+CigZgNE3JOpBi8P8L9lPYtgFrjE/+67JhyW42i41H2XiABq47ykm82Rs uzD91DMGJMmwbP8GSMeUFcGcj9g5zP8HThWz0/ZJ4QnGjoy8og0iZK76c7uW/KOj RtUfnsd7bBvc7LHvkYASfQJzUD3ZpZDKPKbmGLUAklRHW5cI3f8= =5I3y -----END PGP SIGNATURE----- --DITGHUV3p5DjDsXt--