Re: [sqlsmith] Failed to generate plan on lateral subqueries - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [sqlsmith] Failed to generate plan on lateral subqueries
Date
Msg-id 11945.1449594821@sss.pgh.pa.us
Whole thread Raw
In response to Re: [sqlsmith] Failed to generate plan on lateral subqueries  (Andreas Seltenreich <seltenreich@gmx.de>)
Responses Re: [sqlsmith] Failed to generate plan on lateral subqueries  (David Fetter <david@fetter.org>)
List pgsql-hackers
Andreas Seltenreich <seltenreich@gmx.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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Erroneous cost estimation for nested loop join
Next
From: Robert Haas
Date:
Subject: Re: Combining Aggregates