Re: d25ea01275 and partitionwise join - Mailing list pgsql-hackers

From Amit Langote
Subject Re: d25ea01275 and partitionwise join
Date
Msg-id CA+HiwqHbiUi8V7=vJm3rLazkyqFabXNJWLuOr4XnYUDFR+2bGw@mail.gmail.com
Whole thread Raw
In response to Re: d25ea01275 and partitionwise join  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: d25ea01275 and partitionwise join  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Apr 6, 2020 at 11:09 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Amit Langote <amitlangote09@gmail.com> writes:
> > Oops, I thought I copy-pasted 4-way full join test not this one, but
> > evidently didn't.
>
> Have you got such a query at hand?  I wondered whether we shouldn't
> use a 4-way rather than 3-way test case; it'd offer more assurance
> that nesting of these things works.

Hmm, I just did:

-SELECT COUNT(*) FROM prt1 FULL JOIN prt2 p2(b,a,c) USING(a,b) FULL
JOIN prt2 p3(b,a,c) USING (a, b)
+SELECT COUNT(*) FROM prt1 FULL JOIN prt2 p2(b,a,c) USING(a,b) FULL
JOIN prt2 p3(b,a,c) USING (a, b) FULL JOIN prt1 p4 (a,b,c) USING (a,
b)

which does succeed in using partitionwise join.  Please see attached
delta that applies on your v7 if that is what you'd rather have.

-- 
Thank you,

Amit Langote
EnterpriseDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: where should I stick that backup?
Next
From: Justin Pryzby
Date:
Subject: Re: WAL usage calculation patch