pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Seltenreich <seltenreich@gmx.de>
To: pgsql-hackers@lists.postgresql.org
Subject: [sqlsmith] Planner error on lateral joins
Date: Sun, 29 Nov 2020 19:40:50 +0100
Message-ID: <87blfgqa4t.fsf@aurora.ydns.eu> (raw)

Hi,

testing with sqlsmith on master at 3df51ca8b3 produced one instance of
the following error:

    ERROR:  failed to build any 6-way joins

I can reproduce it on a fresh regression database with the query below.
These were last logged in 2015.  Back then, it resulted in this commit:

    http://git.postgresql.org/pg/commitdiff/cfe30a72fa80528997357cb0780412736767e8c4

regards,
Andreas

select * from
  (select sample_1.a as c0
      from fkpart5.fk2 as sample_1) as subq_0,
  lateral (select  1
      from
 (select
  subq_0.c0 as c3,
  subq_5.c0 as c7,
  sample_2.b as c9
       from
  public.brin_test as sample_2,
  lateral (select
        subq_3.c1 as c0
      from
        fkpart5.pk3 as sample_3,
        lateral (select
       sample_2.a as c0,
       sample_3.a as c1
     from
       public.rtest_interface as ref_0
     ) as subq_1,
        lateral (select
       subq_1.c1 as c1
     from
       public.alter_table_under_transition_tables as ref_1
     ) as subq_3
      ) as subq_5) as subq_6
   right join public.gtest30_1 as sample_6
   on (true)
      where subq_6.c7 = subq_6.c3) as subq_7;





view thread (3+ messages)  latest in thread

Message-ID: <87blfgqa4t.fsf@aurora.ydns.eu>
Permalink:  ../87blfgqa4t.fsf@aurora.ydns.eu/
Also on:    postgresql.org/message-id/87blfgqa4t.fsf@aurora.ydns.eu

 · 

reply

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: seltenreich@gmx.de, pgsql-hackers@lists.postgresql.org
  Subject: Re: [sqlsmith] Planner error on lateral joins
  In-Reply-To: <87blfgqa4t.fsf@aurora.ydns.eu>

* 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