]> granicus.if.org Git - postgresql/commit
Prevent generation of bogus subquery scan paths.
authorRobert Haas <rhaas@postgresql.org>
Wed, 25 Apr 2018 19:14:14 +0000 (15:14 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 25 Apr 2018 19:25:55 +0000 (15:25 -0400)
commitdc1057fcd878d5c062c5c4c2b548af2be513b6ab
treec59dae4627f13e4172a3caaddc1b714f3b02fe60
parentf35f30f74b6abb0a2f47c91c20df606cf166e8ff
Prevent generation of bogus subquery scan paths.

Commit 0927d2f46ddd4cf7d6bf2cc84b3be923e0aedc52 didn't check that
consider_parallel was set for the target relation or account for
the possibility that required_outer might be non-empty.

To prevent future bugs of this ilk, add some assertions to
add_partial_path and do a bit of future-proofing of the code
recently added to recurse_set_operations.

Report by Andreas Seltenreich.  Patch by Jeevan Chalke.  Review
by Amit Kapila and by me.

Discussion: http://postgr.es/m/CAM2+6=U+9otsyF2fYB8x_2TBeHTR90itarqW=qAEjN-kHaC7kw@mail.gmail.com
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/pathnode.c
src/test/regress/expected/select_parallel.out
src/test/regress/sql/select_parallel.sql