Re: [sqlsmith] Failed to generate plan on lateral subqueries

From: Andreas Seltenreich <seltenreich(at)gmx(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [sqlsmith] Failed to generate plan on lateral subqueries
Date: 2015-12-08 01:27:11
Message-ID: 876109u3v4.fsf@ex.ansel.ydns.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane writes:

> Andreas Seltenreich <seltenreich(at)gmx(dot)de> writes:
>> I've added new grammar rules to sqlsmith and improved some older ones.
>> This was rewarded with a return of "failed to generate plan" errors.
>
> I believe I've dealt with these cases now. Thanks for the report!

I no longer see "failed to build any n-way joins" after pulling, but
there are still instances of "could not devise a query plan". Samples below.

regards,
Andreas

select
ref_1.aa as c0,
subq_1.c1 as c1,
coalesce(ref_1.class, ref_1.class) as c2,
subq_1.c0 as c3
from
(select
subq_0.c1 as c0,
coalesce(sample_0.a, sample_1.i) as c1
from
public.rtest_t9 as sample_0 tablesample bernoulli (5.6)
inner join public.iportaltest as sample_1 tablesample bernoulli (9.8)
on (sample_0.a = sample_1.i ),
lateral (select
sample_1.d as c0,
ref_0.a as c1,
sample_1.p as c2,
ref_0.a as c3,
ref_0.a as c4,
sample_0.b as c5,
sample_1.i as c6
from
public.rtest_view2 as ref_0
where sample_0.b = sample_0.b
fetch first 93 rows only) as subq_0
where sample_0.b ~<=~ sample_0.b) as subq_1
right join public.e_star as ref_1
on (subq_1.c0 = ref_1.aa )
where ref_1.cc < ref_1.cc
fetch first 59 rows only;

select
sample_69.tmpllibrary as c0,
coalesce(sample_69.tmplname, sample_69.tmplname) as c1,
subq_33.c0 as c2
from
(select
coalesce(ref_53.provider, sample_68.typdefault) as c0
from
pg_catalog.pg_type as sample_68 tablesample bernoulli (6.9)
inner join pg_catalog.pg_shseclabel as ref_53
on (sample_68.typowner = ref_53.objoid ),
lateral (select
sample_68.typcategory as c0,
ref_54.speaker as c1,
ref_54.speaker as c2
from
public.test_range_excl as ref_54
where (ref_53.label >= ref_53.provider)
and (ref_53.label !~* ref_53.provider)
fetch first 143 rows only) as subq_32
where ref_53.label ~>~ ref_53.label) as subq_33
right join pg_catalog.pg_pltemplate as sample_69 tablesample bernoulli (9.8)
on (subq_33.c0 = sample_69.tmplhandler )
where sample_69.tmplvalidator ~ subq_33.c0
fetch first 131 rows only;

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Haribabu Kommi 2015-12-08 04:11:38 Re: pg_hba_lookup function to get all matching pg_hba.conf entries
Previous Message Michael Paquier 2015-12-08 01:27:07 Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.