Still another try at fixing scanjoin_target insertion into parallel plans.
authorTom Lane <[email protected]>
Sat, 18 Jun 2016 04:28:51 +0000 (00:28 -0400)
committerTom Lane <[email protected]>
Sat, 18 Jun 2016 04:28:51 +0000 (00:28 -0400)
commit598aa194af2fb7f294ae4b029494a134a44be333
tree642913f86b2f828e4f9137700f0c023570804b2b
parent7e81a18d49f2ffc3397bde2660b255b56d8a6d77
Still another try at fixing scanjoin_target insertion into parallel plans.

The previous code neglected the fact that the scanjoin_target might
carry sortgroupref labelings that we need to absorb.  Instead, do
create_projection_path() unconditionally, and tweak the path's cost
estimate after the fact.  (I'm now convinced that we ought to refactor
the way we account for sometimes not needing a separate projection step,
but right now is not the time for that sort of cleanup.)

Problem identified by Amit Kapila, patch by me.
src/backend/optimizer/plan/planner.c
src/test/regress/expected/select_parallel.out
src/test/regress/sql/select_parallel.sql