pgsql: Make sequential scans parallel-aware. - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Make sequential scans parallel-aware.
Date
Msg-id E1ZwVz7-0000XD-N7@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Make sequential scans parallel-aware.

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f0661c4e8c44c0ec7acd4ea7c82e85b265447398

Modified Files
--------------
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(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Add outfuncs.c support for GatherPath.
Next
From: Robert Haas
Date:
Subject: pgsql: Generate parallel sequential scan plans in simple cases.