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 1h8agt-0008BE-5e for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Mar 2019 01:15:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h8agr-0006bf-Py for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Mar 2019 01:15:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8agq-0006P6-LK for pgsql-bugs@lists.postgresql.org; Tue, 26 Mar 2019 01:15:45 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8agn-0001P9-Ia for pgsql-bugs@lists.postgresql.org; Tue, 26 Mar 2019 01:15:43 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id DC509366B; Mon, 25 Mar 2019 21:15:39 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 25 Mar 2019 21:15:40 -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=z++5dvZOVDoXXFWK/mXqoFJ/iwN k7F6ORbcwNBGCAG8=; b=MisDIhO6SatJVheQI+f4dIlpkIW5aDydsGmOg1+dxXZ aenzORqu1112rUmLZIg23JkAqdG9G94gGFmvpGp8OH+jQKsO+dOQf+vWDUwIGYC4 Yp8oLp0psWmvQuSd6AoOQsGzyN0MTaOVWmQAKg4R6X3kb9QnIsCDu45Eq7dW9OE8 GmWnwMmWPBwLBXB8Y3CTVXQZ+1aZRGnsWqtMw8c41vk8Y7LhdrTe8xIQir0x5twu RNy3Hs2rvRZ/R+U+5pE+lR0B1niJu4/cXn+4nif4SzShPsIieAOTXp6qdBlSuL9A BzJH+4Qa6TeoPZVdSnjONyBYmM7P86EyuyQ3+2t/o3w== 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=z++5dv ZOVDoXXFWK/mXqoFJ/iwNk7F6ORbcwNBGCAG8=; b=BbCX8nFfIatcdKAnOoZSwl d08M67wMwqtvSHJbJrbGHwRaZnjR6u3lVi9HWDVTM8zqm8vciZLNMW+K7QvZVLxP vlt2l2fjBuoz5EvASQnmqLHz2C4IIsPPNdmA9FL9GPsMN68GkQS+0aB8A2KnkQnB RydgHw1SqvX6RUAn3wSnQVXwzxOaA3JYNIyzJkw//a7zJad+SrtONnDPCPOtFeDS H8odQWijfMRrqplLDWYBl9mrIJmQ3nHg818Ld8PYW6plwwg6n6nIFBDTud956GCa sEgtbArEU2rqRCuq5Kb0TvSzQhwDsAnIM1d+30aAdTuCl5GFHZgZuQxkYv7WFW9g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrjeelgdefvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecukfhppeeiuddrvdduhedrudefjedrudeivdenucfrrghrrghm pehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlhhush htvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id E36A5E46C1; Mon, 25 Mar 2019 21:15:35 -0400 (EDT) Date: Tue, 26 Mar 2019 10:15:32 +0900 From: Michael Paquier To: Amit Langote Cc: Amit Langote , exclusion@gmail.com, PostgreSQL mailing lists , PostgreSQL-development , Peter Eisentraut Subject: Re: BUG #15668: Server crash in transformPartitionRangeBounds Message-ID: <20190326011532.GL2558@paquier.xyz> References: <20190311072114.GG1818@paquier.xyz> <20190314042308.GG3493@paquier.xyz> <20190320020731.GE3488@paquier.xyz> <1937632d-0807-ce70-f608-d075b4866963@lab.ntt.co.jp> <20190320091727.GE26601@paquier.xyz> <20190322050957.GT20192@paquier.xyz> <600097bc-e542-0280-5bc7-c37af1130a25@lab.ntt.co.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9/GiYV45wF7IL3Iq" Content-Disposition: inline In-Reply-To: <600097bc-e542-0280-5bc7-c37af1130a25@lab.ntt.co.jp> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --9/GiYV45wF7IL3Iq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 22, 2019 at 02:49:42PM +0900, Amit Langote wrote: > This comment sounds a bit misleading. The code above this "did" find > field names, but there were too many. What this comment should mention is > that parsing didn't return a single field name, which is the format that > the code below this can do something useful with. I had proposed that > upthread, but maybe that feedback got lost in the discussion about other > related issues. True. I was reviewing that stuff yesterday and I have not been able to finish wrapping it. > +CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted > + FOR VALUES FROM (sum(a)) TO ('2019-01-01'); > +ERROR: function sum(date) does not exist > +LINE 2: FOR VALUES FROM (sum(a)) TO ('2019-01-01'); >=20 > Maybe, we should add to this patch only the tests relevant to the cases > that would lead to crash without this patch. Done as you suggested, with a minimal set enough to trigger the crash, still the error message is rather misleading as you would expect :) > A separate thread will definitely attract more attention, at least in due > time. :) Sure. For now I have committed a lighter version of 0001, with tweaked comments based on your suggestion, as well as a minimum set of test cases. I have added on the way some tests for range partitions which have been missing from the start, and improved the existing set by removing the original "a.a" references, and switching to use max(date) for range partitions to bump correctly on the aggregate error. I am just updating the second patch now and I'll begin a new thread soon. -- Michael --9/GiYV45wF7IL3Iq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlyZfTQACgkQnvQgOdby QH3uwQ//aovp1CvwCisx0AkxifBSX70FD6nYvit2mKImlPxusm0AUG+SE5QpjCuI plrPJR2Y/Rj8j5A4Gl3W03hbeUwj0Vq5QqZKan32K9RKueyCJmD81ttlwoiuR5y9 STBlgcKBxQtRec3S+JXg4Aw2TsWG1wpmFab4PotHXMuUKL3h+LjTyXViBVBsqU9g OFd2hpMUFass/C+kQBSd+m08oMqskgRcnqY8q5UcM0JDSh2Hzfl0rCbZic8yxMqM /d8nAteKes4DbyIfPHNw1d20LLFocrPYi6oqwonlNrcMIRB0Xe++Uc1vkH91mFYZ eXKvZ+mCRj9sXVSb/WflKn4Xt97gAQUszyYmdz01JhHAdBdwV72VPHBOlP0cB9QR Ym0UO059kACJxyeL2gbvnGJd7UGDcOosZpja1lTANDvr2Ya8KbP8xGOH7o/gnf4g cQCg5sByxZu7UHDr+3Tlqpt/OFCuAZ2SOJcTqF3OyoYwiJ3NVVc7XWVfC2bP0zT7 PW8K8Lgdd1Y7VA496K6IQo/+QO2/uxN0TU1e7ZzRduChdMnLCmRVHSV3PmCJtvJy ylcACg0PMd2qrUPBgDEMU/A4VUH33C9KR3K/PeHSekZXSTbGujBeSg8ZfLEAgYbm 58jKv+sO5f1Yz5SXb6iGJfFumq+4yl2p1QADLXjBUTVG0hszJXY= =uh4z -----END PGP SIGNATURE----- --9/GiYV45wF7IL3Iq--