[COMMITTERS] pgsql: Add a Gather Merge executor node. - Mailing list pgsql-committers

From Robert Haas
Subject [COMMITTERS] pgsql: Add a Gather Merge executor node.
Date
Msg-id E1clxVm-0001Zk-Ce@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Add a Gather Merge executor node.

Like Gather, we spawn multiple workers and run the same plan in each
one; however, Gather Merge is used when each worker produces the same
output ordering and we want to preserve that output ordering while
merging together the streams of tuples from various workers.  (In a
way, Gather Merge is like a hybrid of Gather and MergeAppend.)

This works out to a win if it saves us from having to perform an
expensive Sort.  In cases where only a small amount of data would need
to be sorted, it may actually be faster to use a regular Gather node
and then sort the results afterward, because Gather Merge sometimes
needs to wait synchronously for tuples whereas a pure Gather generally
doesn't.  But if this avoids an expensive sort then it's a win.

Rushabh Lathia, reviewed and tested by Amit Kapila, Thomas Munro,
and Neha Sharma, and reviewed and revised by me.

Discussion: http://postgr.es/m/CAGPqQf09oPX-cQRpBKS0Gq49Z+m6KBxgxd_p9gX8CKk_d75HoQ@mail.gmail.com

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/355d3993c53ed62c5b53d020648e4fbcfbf5f155

Modified Files
--------------
doc/src/sgml/config.sgml                      |  14 +
src/backend/commands/explain.c                |  23 +
src/backend/executor/Makefile                 |   2 +-
src/backend/executor/execProcnode.c           |  17 +
src/backend/executor/nodeGatherMerge.c        | 687 ++++++++++++++++++++++++++
src/backend/nodes/copyfuncs.c                 |  28 ++
src/backend/nodes/outfuncs.c                  |  46 ++
src/backend/nodes/readfuncs.c                 |  22 +
src/backend/optimizer/path/allpaths.c         |  36 +-
src/backend/optimizer/path/costsize.c         |  68 +++
src/backend/optimizer/plan/createplan.c       |  86 ++++
src/backend/optimizer/plan/planner.c          | 127 ++++-
src/backend/optimizer/plan/setrefs.c          |   1 +
src/backend/optimizer/plan/subselect.c        |   1 +
src/backend/optimizer/util/pathnode.c         |  60 +++
src/backend/utils/misc/guc.c                  |   9 +
src/include/executor/nodeGatherMerge.h        |  27 +
src/include/nodes/execnodes.h                 |  29 ++
src/include/nodes/nodes.h                     |   3 +
src/include/nodes/plannodes.h                 |  16 +
src/include/nodes/relation.h                  |  13 +
src/include/optimizer/cost.h                  |   5 +
src/include/optimizer/pathnode.h              |   7 +
src/test/regress/expected/select_parallel.out |  27 +
src/test/regress/expected/sysviews.out        |   3 +-
src/test/regress/sql/select_parallel.sql      |  11 +
src/tools/pgindent/typedefs.list              |   3 +
27 files changed, 1355 insertions(+), 16 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: [COMMITTERS] pgsql: Fix inclusions of c.h from .h files.
Next
From: Peter Eisentraut
Date:
Subject: [COMMITTERS] pgsql: Enable replication connections by default in pg_hba.conf