Re: [Sender Address Forgery]Re: [HACKERS] path toward faster partition pruning

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, amul sul <sulamul(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, Beena Emerson <memissemerson(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [Sender Address Forgery]Re: [HACKERS] path toward faster partition pruning
Date: 2017-11-15 02:16:51
Message-ID: 7481a733-653a-5f8f-1f94-1aa8dbf816c5@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Steve Singer 2017-11-15 03:00:51 Re: [HACKERS] pgbench regression test failure
Previous Message Nikita Glukhov 2017-11-15 01:17:05 Re: [HACKERS] SQL/JSON in PostgreSQL