From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: negative bitmapset member not allowed Error with partition pruning |
Date: | 2018-07-30 22:54:46 |
Message-ID: | 20180730225446.w7j7kpkeow7ljrjm@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2018-Jul-27, David Rowley wrote:
> On 27 July 2018 at 15:14, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Well, my thinking is that it helps nobody if call sites have to have
> > explicit workarounds for a totally-arbitrary refusal to handle edge
> > cases in the primitive functions. I do not think that is good software
> > design. If you want to have assertions that particular call sites are
> > specifying nonempty ranges, put those in the call sites where it's
> > important. But as-is, this seems like, say, defining foreach() to
> > blow up on an empty list.
>
> Okay, that's a fair point. I agree, adding Asserts at the current
> call sites seems better.
Given the discussion, I pushed two commits: first, bms_add_range returns
the input bms if the range is empty, also adding Rajkumar's test case,
which I also verified to reproduce the bug, and passes (for me) with the
bms_add_range change.
The second commit includes the proposed asserts, but not the change to
avoid calling bms_add_range when the range is empty.
Thanks!
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2018-07-30 23:00:35 | Re: Avoid extra Sort nodes between WindowAggs when sorting can be reused |
Previous Message | Tom Lane | 2018-07-30 22:16:07 | Re: make installcheck-world in a clean environment |