From: Michael Paquier <michael@paquier.xyz>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: exclusion@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Subject: Re: BUG #15668: Server crash in transformPartitionRangeBounds
Date: Tue, 26 Mar 2019 10:15:32 +0900
Message-ID: <20190326011532.GL2558@paquier.xyz> (raw)
In-Reply-To: <600097bc-e542-0280-5bc7-c37af1130a25@lab.ntt.co.jp>
References: <ab51ec5a-b2d3-a25f-5695-7555ad63d344@lab.ntt.co.jp>
<20190311072114.GG1818@paquier.xyz>
<ea8b7d1c-cee1-a062-ee67-2870bf223e64@lab.ntt.co.jp>
<a3947672-4853-2b39-32f3-ec347b7c99dd@lab.ntt.co.jp>
<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>
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');
>
> 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
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: michael@paquier.xyz, Langote_Amit_f8@lab.ntt.co.jp, amitlangote09@gmail.com, pgsql-hackers@postgresql.org, peter.eisentraut@2ndquadrant.com
Subject: Re: BUG #15668: Server crash in transformPartitionRangeBounds
In-Reply-To: <20190326011532.GL2558@paquier.xyz>
References: <ab51ec5a-b2d3-a25f-5695-7555ad63d344@lab.ntt.co.jp> <20190311072114.GG1818@paquier.xyz> <ea8b7d1c-cee1-a062-ee67-2870bf223e64@lab.ntt.co.jp> <a3947672-4853-2b39-32f3-ec347b7c99dd@lab.ntt.co.jp> <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> <20190326011532.GL2558@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox