Re: negative bitmapset member not allowed Error with partition pruning

2018-07-30 Thread Alvaro Herrera
On 2018-Jul-27, David Rowley wrote: > On 27 July 2018 at 15:14, Tom Lane 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 soft

Re: negative bitmapset member not allowed Error with partition pruning

2018-07-26 Thread David Rowley
On 27 July 2018 at 15:14, Tom Lane wrote: > David Rowley writes: >> On 27 July 2018 at 13:35, Amit Langote 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-o

Re: negative bitmapset member not allowed Error with partition pruning

2018-07-26 Thread Amit Langote
On 2018/07/27 12:14, Tom Lane wrote: > David Rowley writes: >> On 27 July 2018 at 13:35, Amit Langote 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

Re: negative bitmapset member not allowed Error with partition pruning

2018-07-26 Thread Tom Lane
David Rowley writes: > On 27 July 2018 at 13:35, Amit Langote 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 thankfu

Re: negative bitmapset member not allowed Error with partition pruning

2018-07-26 Thread David Rowley
On 27 July 2018 at 13:35, Amit Langote 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 thos

Re: negative bitmapset member not allowed Error with partition pruning

2018-07-26 Thread Amit Langote
On 2018/07/27 1:28, Tom Lane wrote: > Rajkumar Raghuwanshi writes: >> I am getting "ERROR: negative bitmapset member not allowed" when >> enable_partition_pruning set to true with below test case. Thanks Rajkumar. > Confirmed here. It's failing in perform_pruning_combine_step, > which reaches

Re: negative bitmapset member not allowed Error with partition pruning

2018-07-26 Thread Tom Lane
Rajkumar Raghuwanshi writes: > I am getting "ERROR: negative bitmapset member not allowed" when > enable_partition_pruning set to true with below test case. Confirmed here. It's failing in perform_pruning_combine_step, which reaches this: result->bound_offsets = bms_add_range(NULL, 0,