Re: [sqlsmith] Planner error on lateral joins

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andreas Seltenreich <seltenreich@gmx.de>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2020-11-29T20:39:42Z
Lists: pgsql-hackers

Attachments

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

Commits

  1. Fix miscomputation of direct_lateral_relids for join relations.

  2. Undo mistaken tightening in join_is_legal().