Re: BUG #15668: Server crash in transformPartitionRangeBounds

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Amit Langote <amitlangote09(at)gmail(dot)com>, exclusion(at)gmail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Subject: Re: BUG #15668: Server crash in transformPartitionRangeBounds
Date: 2019-03-26 01:15:32
Message-ID: 20190326011532.GL2558@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Langote 2019-03-26 01:24:52 Re: BUG #15668: Server crash in transformPartitionRangeBounds
Previous Message Thomas Munro 2019-03-26 00:42:40 Re: parallel query hangs - impossible to cancel

Browse pgsql-hackers by date

  From Date Subject
Next Message Haribabu Kommi 2019-03-26 01:19:20 Re: [HACKERS] Block level parallel vacuum
Previous Message Tatsuro Yamada 2019-03-26 01:04:48 Re: [HACKERS] CLUSTER command progress monitor