Re: [HACKERS] Runtime Partition Pruning

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
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-03-01 13:04:41
Message-ID: CAKJS1f9xAKLew74v57zXBp4H5=g=V=TixbrnaYGLrquTD_5BRA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I've attached v14 of the patch.

This is based on Amit's faster partition pruning patch v35 [1]

There's quite a bit of code churn in this version from the last
version. I've now moved most of the run-time pruning code into
execPartition.c and aimed to make it more generic to apply to node
types other than Append. I also had to make a few changes to the
PartitionPruneInfo node type so that it could get some support in
readfuncs.c and outfuncs.c, which I had previously missed. As proof
that the code in execPartition.c is fairly generic and applies to any
subnode type that supports a List of subnodes, I went ahead and wrote
a small additional patch to add support for run-time pruning for
MergeAppend. This just takes an extra 100 lines of code.

I've also split the patch out a bit more into logical parts in the
hope it makes things easier to review.

[1] https://www.postgresql.org/message-id/0f96dd16-f5d5-7301-4ddf-858d41a6cbe3@lab.ntt.co.jp

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
v14-0001-Add-bms_prev_member-function.patch application/octet-stream 5.3 KB
v14-0002-Extract-code-to-build-partition-expressions-into.patch application/octet-stream 4.1 KB
v14-0003-Provide-infrastructure-to-allow-partition-prunin.patch application/octet-stream 34.2 KB
v14-0004-Allow-Append-subnodes-to-be-pruned-during-execut.patch application/octet-stream 80.9 KB
v14-0005-Allow-MergeAppend-s-subnodes-to-be-pruned-during.patch application/octet-stream 14.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2018-03-01 13:09:02 Re: 2018-03 Commitfest Summary (Andres #1)
Previous Message Robert Haas 2018-03-01 12:56:26 Re: [HACKERS] path toward faster partition pruning