Re: Partition-wise join for join between (declaratively) partitioned tables

From: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
To: Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Partition-wise join for join between (declaratively) partitioned tables
Date: 2017-07-14 07:02:30
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers

On Mon, Jul 10, 2017 at 3:57 PM, Ashutosh Bapat
<ashutosh(dot)bapat(at)enterprisedb(dot)com> wrote:
> On Tue, Jul 4, 2017 at 10:02 AM, Ashutosh Bapat
> <ashutosh(dot)bapat(at)enterprisedb(dot)com> wrote:
>> On Fri, Jun 30, 2017 at 2:53 PM, Rafia Sabih
>> <rafia(dot)sabih(at)enterprisedb(dot)com> wrote:
>>> On Mon, May 22, 2017 at 12:02 PM, Ashutosh Bapat
>>> <ashutosh(dot)bapat(at)enterprisedb(dot)com> wrote:
>>>> Here's set of patches rebased on latest head.
>>> In an attempt to test this set of patches, I found that not all of the
>>> patches could be applied on latest head-- commit
>>> 08aed6604de2e6a9f4d499818d7c641cbf5eb9f7
>>> Might be in need of rebasing.
>> Thanks Rafia for your interest. I have started rebasing the patches on
>> the latest head. I am expecting it to take some time. Will update the
>> thread with the patches once I am done rebasing them.
> Here are patches rebased.
> As mentioned in my previous mail [1], the last two patches are not
> complete but are included, so that the reviewer can see the changes we
> will have to make when we go towards more general partition-wise join.
> Please use patches upto 0015, which implement 1:1 partition mapping
> for benchmarking and testing.
> [1]

Here's revised patch set with only 0004 revised. That patch deals with
creating multi-level inheritance hierarchy from multi-level partition
hierarchy. The original logic of recursively calling
inheritance_planner()'s guts over the inheritance hierarchy required
that for every such recursion we flatten many lists created by that
code. Recursion also meant that root->append_rel_list is traversed as
many times as the number of partitioned partitions in the hierarchy.
Instead the revised version keep the iterative shape of
inheritance_planner() intact, thus naturally creating flat lists,
iterates over root->append_rel_list only once and is still easy to
read and maintain.

Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

Attachment Content-Type Size
pg_dp_join_patches_v22.tar.gz application/x-gzip 150.1 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2017-07-14 08:34:24 Re: PgFDW connection invalidation by ALTER SERVER/ALTER USER MAPPING
Previous Message Ashutosh Sharma 2017-07-14 06:35:43 Re: pl/perl extension fails on Windows