Re: [HACKERS] Runtime Partition Pruning

Beena Emerson <memissemerson@gmail.com>

From: Beena Emerson <memissemerson@gmail.com>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, Robert Haas <robertmhaas@gmail.com>, amul sul <sulamul@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Dilip Kumar <dilipbalaut@gmail.com>
Date: 2017-12-21T13:06:04Z
Lists: pgsql-hackers
Hello,

On Thu, Dec 21, 2017 at 6:30 PM, David Rowley
<david.rowley@2ndquadrant.com> wrote:
> On 22 December 2017 at 01:43, Beena Emerson <memissemerson@gmail.com> wrote:
>>> I wonder if Robert understands the extent of the problem. The patch
>>> will be useful to prune away partitions when the partitioned table is
>>> on the inside of a parameterised nested loop join, but I think we'll
>>> likely get some complaints about PREPARE statements always using a
>>> custom plan.  It's going to make this pretty hard to write regression
>>> tests for unless we went and invent some GUC "prefer_generic_plan", or
>>> "generic_plan_cost_multiplier" to provide a way to coax
>>> choose_custom_plan() into not choosing a custom plan.  I admit to not
>>> having the answer to this but I don't think we should rule out
>>> discussing possible fixes.
>>
>> I have attached the regression tests I am currently using to check my
>> patch.  It has few prepared statements using runtime pruning.
>
> Thanks for sending.  Will the tests still pass if you remove the hack
> from choose_custom_plan()?
>

The hack has been removed in the v7 patch sent and yes the tests work
without any additional adjustments.

Thank you,

Beena Emerson

EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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