From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: negative bitmapset member not allowed Error with partition pruning
Date: Thu, 26 Jul 2018 23:14:45 -0400
Message-ID: <20160.1532661285@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKJS1f-z_EZxLZeb7dbJ5G89O6c=7CBPr4Z4WHJiHnBHB+8R3Q@mail.gmail.com>
References: <CAKcux6k=udMa_oOXnbHduBwvJ8SnUaQxRLPA=D2+ryYoyT6eeA@mail.gmail.com>
<16590.1532622503@sss.pgh.pa.us>
<d3b0d77d-001a-157b-816d-71badd9a9226@lab.ntt.co.jp>
<CAKJS1f-z_EZxLZeb7dbJ5G89O6c=7CBPr4Z4WHJiHnBHB+8R3Q@mail.gmail.com>
David Rowley <david.rowley@2ndquadrant.com> writes:
> On 27 July 2018 at 13:35, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> wrote:
>> On 2018/07/27 1:28, Tom Lane wrote:
>>> (BTW, I'm not sure that it was wise to design bms_add_range to fail for
>>> empty ranges. Maybe it'd be better to redefine it as a no-op for
>>> upper < lower?)
>> FWIW, I was thankful that David those left those checks there, because it
>> helped expose quite a few bugs when writing this code or perhaps that was
>> his intention to begin with, but maybe he thinks differently now (?).
> I think it's more useful to keep as a bug catcher, although I do
> understand the thinking behind just having it be a no-op.
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.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.rowley@2ndquadrant.com, Langote_Amit_f8@lab.ntt.co.jp, rajkumar.raghuwanshi@enterprisedb.com
Subject: Re: negative bitmapset member not allowed Error with partition pruning
In-Reply-To: <20160.1532661285@sss.pgh.pa.us>
* 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