Re: BUG #15694: Server crash in EXPLAIN with LATERAL and a partitioned table

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Date: 2019-03-14T14:40:20Z
Lists: pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> CREATE TABLE prt1_l (a int) PARTITION BY RANGE(a);
> CREATE TABLE prt2_l (a int);

> EXPLAIN
> SELECT * FROM prt1_l t1 LEFT JOIN LATERAL
>   (SELECT t1.a as t1a, prt1_l.a FROM prt1_l) t2 ON t1.a = t2.a;

> crashes the server with the stack trace:

Huh.  Clearly, when we added that Assert, we should've fixed
set_dummy_rel_pathlist so that it would properly populate the
required_outer of the dummy path.  I'm surprised though that
this wasn't already exposed by the existing regression tests...

			regards, tom lane


Commits

  1. Ensure dummy paths have correct required_outer if rel is parameterized.