]> granicus.if.org Git - postgresql/commit
Try again to fix the way the scanjoin_target is used with partial paths.
authorRobert Haas <rhaas@postgresql.org>
Fri, 17 Jun 2016 20:25:02 +0000 (16:25 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 17 Jun 2016 20:29:07 +0000 (16:29 -0400)
commit54f5c5150fa05d7ad15f8406debd5a2b394885b5
treea93b72f6e41a09d65fd5a2519bc501fc2e825009
parentede62e56fbe809baa1a7bc3873d82f12ffe7540b
Try again to fix the way the scanjoin_target is used with partial paths.

Commit 04ae11f62e643e07c411c4935ea6af46cb112aa9 removed some broken
code to apply the scan/join target to partial paths, but its theory
that this processing step is totally unnecessary turns out to be wrong.
Put similar code back again, but this time, check for parallel-safety
and avoid in-place modifications to paths that may already have been
used as part of some other path.

(This is not an entirely elegant solution to this problem; it might
be better, for example, to postpone generate_gather_paths for the
topmost scan/join rel until after the scan/join target has been
applied.  But this is not the time for such redesign work.)

Amit Kapila and Robert Haas
src/backend/optimizer/plan/planagg.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/pathnode.c
src/include/optimizer/pathnode.h
src/test/regress/expected/select_parallel.out
src/test/regress/sql/select_parallel.sql