Fix parallel hash join path search.
authorRobert Haas <rhaas@postgresql.org>
Tue, 7 Mar 2017 15:22:07 +0000 (10:22 -0500)
committerRobert Haas <rhaas@postgresql.org>
Tue, 7 Mar 2017 15:22:07 +0000 (10:22 -0500)
commit655393a022bd653e2b48dbf20b69236981e35195
tree90ded750bd3a37b7130133b32ccc65c9dc8d656e
parentb2678efd43f17db7dfa04e0ca076ea01275cd9bc
Fix parallel hash join path search.

When the very cheapest path is not parallel-safe, we want to instead use
the cheapest unparameterized path that is.  The old code searched
innerrel->cheapest_parameterized_paths, but that isn't right, because
the path we want may not be in that list.  Search innerrel->pathlist
instead.

Spotted by Dilip Kumar.

Discussion: http://postgr.es/m/CAFiTN-szCEcZrQm0i_w4xqSaRUTOUFstNu32Zn4rxxDcoa8gnA@mail.gmail.com
src/backend/optimizer/path/joinpath.c