Fix possible crash in partition-wise join.

Robert Haas <rhaas@postgresql.org>

Commit: f069c91a5793ff6b7884120de748b2005ee7756f
Author: Robert Haas <rhaas@postgresql.org>
Date: 2018-02-05T22:31:57Z
Releases: 11.0
Fix possible crash in partition-wise join.

The previous code assumed that we'd always succeed in creating
child-joins for a joinrel for which partition-wise join was considered,
but that's not guaranteed, at least in the case where dummy rels
are involved.

Ashutosh Bapat, with some wordsmithing by me.

Discussion: http://postgr.es/m/CAFjFpRf8=uyMYYfeTBjWDMs1tR5t--FgOe2vKZPULxxdYQ4RNw@mail.gmail.com

Files

Discussion