Re: Multi-Column List Partitioning

From: Zhihong Yu <zyu(at)yugabyte(dot)com>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, Nitin Jadhav <nitinjadhavpostgres(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Multi-Column List Partitioning
Date: 2021-10-01 15:09:07
Message-ID: CALNJ-vTM+9qGRrWj1OGAOaFeQnon_q4YSJWGaRhf5_cGzHqBtQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 1, 2021 at 6:56 AM Amit Langote <amitlangote09(at)gmail(dot)com> wrote:

> Hi,
>
> On Mon, Sep 13, 2021 at 7:17 PM Rajkumar Raghuwanshi
> <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com> wrote:
> > On PG head + Nitin's v3 patch + Amit's Delta patch. Make check is
> failing with below errors.
>
> Thanks Rajkumar for testing.
>
> > --inherit.sql is failing with error :"ERROR: negative bitmapset member
> not allowed"
> > update mlparted_tab mlp set c = 'xxx'
> > from
> > (select a from some_tab union all select a+1 from some_tab) ss (a)
> > where (mlp.a = ss.a and mlp.b = 'b') or mlp.a = 3;
> > ERROR: negative bitmapset member not allowed
> >
> > --partition_join.sql is crashing with enable_partitionwise_join set to
> true.
>
> Here's a v2 of the delta patch that should fix both of these test
> failures. As I mentioned in my last reply, my delta patch fixed what
> I think were problems in Nitin's v3 patch but were not complete by
> themselves. Especially, I hadn't bothered to investigate various /*
> TODO: handle multi-column list partitioning */ sites to deal with my
> own changes.
>
> In the attached updated version, I've dealt with some of those such
> that at least the existing cases exercising partition pruning and
> partition wise joins now pass.
>
> I thought about sending a v4 of the main patch with my proposed
> changes so far integrated, but decided to just post a delta_v2 for
> now.
>
> --
> Amit Langote
> EDB: http://www.enterprisedb.com

Hi,

+ for (i = 0; i < partnatts; i++)
+ {
+ if (outer_isnull[i])
+ outer_has_null = true;

We can come out of the loop once outer_has_null is assigned.
Similar comment for the loop inside if (inner_isnull).

+ * For the multi-column case, we must make an BoolExpr that

an BoolExpr -> a BoolExpr

Cheers

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hans Buschmann 2021-10-01 15:15:59 VS2022: Support Visual Studio 2022 on Windows
Previous Message osumi.takamichi@fujitsu.com 2021-10-01 14:52:24 RE: Failed transaction statistics to measure the logical replication progress