Re: [HACKERS] Runtime Partition Pruning

Amit Langote <langote_amit_f8@lab.ntt.co.jp>

From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>, Beena Emerson <memissemerson@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Robert Haas <robertmhaas@gmail.com>, amul sul <sulamul@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Dilip Kumar <dilipbalaut@gmail.com>
Date: 2018-02-27T09:39:47Z
Lists: pgsql-hackers

Attachments

Hi David.

On 2018/02/23 20:34, David Rowley wrote:
> On 22 February 2018 at 22:31, Amit Langote
> <Langote_Amit_f8@lab.ntt.co.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

Commits

  1. Initialize ExprStates once in run-time partition pruning

  2. Add bms_prev_member function

  3. Support partition pruning at execution time

  4. Document partprune.c a little better

  5. Fix crash in pg_replication_slot_advance

  6. Add parallel-aware hash joins.

  7. Fix typo.

  8. Allow --with-bonjour to work with non-macOS implementations of Bonjour.

  9. Mention need for --no-inc-recursive in rsync command