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

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

Andreas Seltenreich <seltenreich(at)gmx(dot)de> writes:
>> 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.

> sorry, I spoke too soon: nine of the former have been logged through the
> night. I'm attaching a larger set of sample queries this time in case
> that there are still multiple causes for the observed errors.

Hm. At least in the first of these cases, the problem is that the code
I committed yesterday doesn't account for indirect lateral dependencies.
That is, if S1 depends on S2 which depends on the inner side of an outer
join, it now knows not to join S2 directly to the outer side of the outer
join, but it doesn't realize that the same must apply to S1.

Maybe we should redefine lateral_relids as the transitive closure of
a rel's lateral dependencies? Not sure.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-12-08 17:18:05 Re: Combining Aggregates
Previous Message Robert Haas 2015-12-08 16:30:29 Re: Erroneous cost estimation for nested loop join