Re: [Sender Address Forgery]Re: [HACKERS] path toward fasterpartition pruning - Mailing list pgsql-hackers

From Amit Langote
Subject Re: [Sender Address Forgery]Re: [HACKERS] path toward fasterpartition pruning
Date
Msg-id 7481a733-653a-5f8f-1f94-1aa8dbf816c5@lab.ntt.co.jp
Whole thread Raw
In response to Re: [HACKERS] path toward faster partition pruning  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers
Hi David.

On 2017/11/14 13:00, David Rowley wrote:
> On 13 November 2017 at 22:46, Amit Langote wrote:
>> On 2017/11/10 12:30, Kyotaro HORIGUCHI wrote:
>>> The following uses a bit tricky bitmap operation but
>>> is straightforward as a whole.
>>>
>>> =====
>>> /* fill the bits upper from BITNUM(lower) (0-based) of the first word */
>>> a->workds[wordnum++] += ~(bitmapword)((1 << BITNUM(lower)) - 1);
>>>
>>> /* fill up intermediate words */
>>> while (wordnum < uwordnum)
>>>    a->words[wordnum++] = ~(bitmapword) 0;
>>>
>>> /* fill up to BITNUM(upper) bit (0-based) of the last word */
>>> a->workds[wordnum++] |=
>>>      (~(bitmapword) 0) >> (BITS_PER_BITMAPWORD - (BITNUM(upper) - 1));
>>> =====
>>
>> Considering also the David's comment downthread, I will try to incorporate
>> this into bms_add_range().
> 
> I've attached an implementation of the patch using this method.

[ ... ]

> Probably just go with Kyotaro's idea (v2). I don't think this is worth
> debating, I just wanted to show it's not that clear-cut.

Thanks.  I have incorporated the v2 patch in my local repository.  I'm
still working through some of the review comments and will be able to
post a new version no later than tomorrow, including support for the new
hash partitioning.

Thanks,
Amit



pgsql-hackers by date:

Previous
From: Nikita Glukhov
Date:
Subject: Re: [HACKERS] SQL/JSON in PostgreSQL
Next
From: Steve Singer
Date:
Subject: Re: [HACKERS] pgbench regression test failure