Prevent generation of bogus subquery scan paths.
Robert Haas <rhaas@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/path/allpaths.c | modified | +23 −18 |
| src/backend/optimizer/prep/prepunion.c | modified | +2 −1 |
| src/backend/optimizer/util/pathnode.c | modified | +6 −0 |
| src/test/regress/expected/select_parallel.out | modified | +19 −0 |
| src/test/regress/sql/select_parallel.sql | modified | +6 −0 |
Discussion
- [sqlsmith] Failed assertion in create_gather_path 11 messages · 2018-04-07 → 2018-04-25