Re: [HACKERS] Runtime 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: Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, Beena Emerson <memissemerson(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, amul sul <sulamul(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Subject: Re: [HACKERS] Runtime Partition Pruning
Date: 2018-02-27 09:39:47
Message-ID: 2dbe3de6-ad07-655f-1278-356709cbf185@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Hi David.

On 2018/02/23 20:34, David Rowley wrote:
> On 22 February 2018 at 22:31, Amit Langote
> <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>> Some comments:
>>
>> * I noticed that the patch adds a function to bitmapset.c which you might
>> want to extract into its own patch, like your patch to add bms_add_range()
>> that got committed as 84940644d [2].
>
> I've made that 0001 in the series

Thanks.

> I've attached an updated set of patches.
>
> I hope this also addresses Rajkumar reported crash. I ended up making
> some changes to how the Param values are determined by reusing more of
> the existing executor code rather than duplicating it in
> partkey_datum_from_expr. I really could use a sanity check on my
> changes to that function now, especially the cross type portion.

I've incorporated portions of 0002 and 0003 into my patch on the other
thread (v34) posted at [1]. That is, mostly the changes around handling
OR clauses and interface changes resulting from it.

Attached are revised version of your patches after the aforementioned
rearrangements. Note that after I took out the optimizer portion of the
0003 patch to incorporate it into my patch (OR clause processing bits),
not much was left in it, so I squashed it into 0002. So there are only
0001 and 0002.

As a review comment on 0002, I think trypartitionprune is better written
as try_partition_prune.

Thanks,
Amit

[1]
https://www.postgresql.org/message-id/158f04ce-9deb-0457-ddcc-78fb73db4ebc%40lab.ntt.co.jp

Attachment Content-Type Size
v13-0001-Add-bms_prev_member-function.patch text/plain 5.3 KB
v13-0002-Allow-partition-elimination-to-occur-during-exec.patch text/plain 110.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2018-02-27 09:50:24 Re: [HACKERS] Runtime Partition Pruning
Previous Message Amit Langote 2018-02-27 09:33:04 Re: [HACKERS] path toward faster partition pruning