From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andreas Seltenreich <seltenreich@gmx.de>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: [sqlsmith] Planner error on lateral joins
Date: Sun, 29 Nov 2020 15:39:42 -0500
Message-ID: <1106991.1606682382@sss.pgh.pa.us> (raw)
In-Reply-To: <87blfgqa4t.fsf@aurora.ydns.eu>
References: <87blfgqa4t.fsf@aurora.ydns.eu>
Andreas Seltenreich <seltenreich@gmx.de> writes:
> testing with sqlsmith on master at 3df51ca8b3 produced one instance of
> the following error:
> ERROR: failed to build any 6-way joins
Thanks for the test case! The attached modification to use only
longstanding test tables fails back to 9.5, but succeeds in 9.4.
I've not tried to bisect yet.
regards, tom lane
Attachments:lateraljoinbug.sql (text/plain, 667B) download
select * from
(select sample_1.f1 as c0
from int4_tbl as sample_1) as subq_0,
lateral (select 1
from
(select
subq_0.c0 as c3,
subq_5.c0 as c7,
sample_2.q2 as c9
from
int8_tbl as sample_2,
lateral (select
subq_3.c1 as c0
from
int4_tbl as sample_3,
lateral (select
sample_2.q1 as c0,
sample_3.f1 as c1
from
public.rtest_interface as ref_0
) as subq_1,
lateral (select
subq_1.c1 as c1
from
int4_tbl as ref_1
) as subq_3
) as subq_5) as subq_6
right join int4_tbl as sample_6
on (true)
where subq_6.c7 = subq_6.c3) as subq_7;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, seltenreich@gmx.de, pgsql-hackers@lists.postgresql.org
Subject: Re: [sqlsmith] Planner error on lateral joins
In-Reply-To: <1106991.1606682382@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox