Make sequential scans parallel-aware

Enterprise / PostgreSQL - Robert Haas [postgresql.org] - 11 November 2015 07:57 UTC

In addition, this path fills in a number of missing bits and pieces in the parallel infrastructure. Paths and plans now have a parallel_aware flag indicating whether whatever parallel-aware logic they have should be engaged. It is believed that we will need this flag for a number of path/plan types, not just sequential scans, which is why the flag is generic rather than part of the SeqScan structures specifically. Also, execParallel.c now gives parallel nodes a chance to initialize their PlanState nodes from the DSM during parallel worker startup.

Amit Kapila, with a fair amount of adjustment by me. Review of previous patch versions by Haribabu Kommi and others.

f0661c4 Make sequential scans parallel-aware.
src/backend/commands/explain.c | 4 +
src/backend/executor/execAmi.c | 9 ++
src/backend/executor/execParallel.c | 54 ++++++++++--
src/backend/executor/nodeSeqscan.c | 136 +++++++++++++++++++++++--------
src/backend/nodes/copyfuncs.c | 1 +
src/backend/nodes/outfuncs.c | 2 +
src/backend/nodes/readfuncs.c | 1 +
src/backend/optimizer/path/allpaths.c | 2 +-
src/backend/optimizer/path/costsize.c | 15 +++-
src/backend/optimizer/plan/createplan.c | 44 +++++-----
src/backend/optimizer/plan/planner.c | 2 +-
src/backend/optimizer/util/pathnode.c | 29 ++++++-
src/include/executor/nodeSeqscan.h | 6 ++
src/include/nodes/execnodes.h | 12 ++-
src/include/nodes/plannodes.h | 5 ++
src/include/nodes/relation.h | 1 +
src/include/optimizer/cost.h | 2 +-
src/include/optimizer/pathnode.h | 2 +-
18 files changed, 254 insertions(+), 73 deletions(-)

Upstream: git.postgresql.org


  • Share