forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit11cf92f
committed
Rewrite the code that applies scan/join targets to paths.
If the toplevel scan/join target list is parallel-safe, postponegenerating Gather (or Gather Merge) paths until after the toplevel hasbeen adjusted to return it. This (correctly) makes queries withexpensive functions in the target list more likely to choose aparallel plan, since the cost of the plan now reflects the fact thatthe evaluation will happen in the workers rather than the leader.The original complaint about this problem was from Jeff Janes.If the toplevel scan/join relation is partitioned, recursively applythe changes to all partitions. This sometimes allows us to get rid ofResult nodes, because Append is not projection-capable but itschildren may be. It also cleans up what appears to be incorrect SRFhandling from commite2f1eb0: the oldcode had no knowledge of SRFs for child scan/join rels.Because we now use create_projection_path() in some cases where weformerly used apply_projection_to_path(), this changes the orderingof columns in some queries generated by postgres_fdw. Updateregression outputs accordingly.Patch by me, reviewed by Amit Kapila and by Ashutosh Bapat. Otherfixes for this problem (substantially different from this version)were reviewed by Dilip Kumar, Amit Khandekar, and Marina Polyakova.Discussion:http://postgr.es/m/CAMkU=1ycXNipvhWuweUVpKuyu6SpNjF=yHWu4c4US5JgVGxtZQ@mail.gmail.com1 parent3f90ec8 commit11cf92f
File tree
3 files changed
+606
-529
lines changed- contrib/postgres_fdw/expected
- src
- backend/optimizer/plan
- test/regress/expected
3 files changed
+606
-529
lines changed0 commit comments
Comments
(0)