Thread: pgsql: Allow aggregate transition states to be serialized and deseriali

pgsql: Allow aggregate transition states to be serialized and deseriali

From
Robert Haas
Date:
Allow aggregate transition states to be serialized and deserialized.

This is necessary infrastructure for supporting parallel aggregation
for aggregates whose transition type is "internal".  Such values
can't be passed between cooperating processes, because they are
just pointers.

David Rowley, reviewed by Tomas Vondra and by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5fe5a2cee91117673e04617aeb1a38e305dcd783

Modified Files
--------------
doc/src/sgml/catalogs.sgml              |  18 ++
doc/src/sgml/ref/create_aggregate.sgml  |  50 +++++
src/backend/catalog/pg_aggregate.c      |  80 +++++++-
src/backend/commands/aggregatecmds.c    |  82 +++++++++
src/backend/executor/nodeAgg.c          | 273 +++++++++++++++++++++++++--
src/backend/nodes/copyfuncs.c           |   1 +
src/backend/nodes/outfuncs.c            |   1 +
src/backend/nodes/readfuncs.c           |   1 +
src/backend/optimizer/plan/createplan.c |   7 +-
src/backend/optimizer/plan/planner.c    |  17 +-
src/backend/optimizer/plan/setrefs.c    |   8 +-
src/backend/optimizer/prep/prepunion.c  |   3 +-
src/backend/optimizer/util/clauses.c    |  12 +-
src/backend/optimizer/util/pathnode.c   |   4 +-
src/backend/optimizer/util/tlist.c      |  11 +-
src/backend/parser/parse_agg.c          |  39 ++++
src/bin/pg_dump/pg_dump.c               |  50 ++++-
src/include/catalog/catversion.h        |   2 +-
src/include/catalog/pg_aggregate.h      | 314 +++++++++++++++++---------------
src/include/nodes/execnodes.h           |   1 +
src/include/nodes/plannodes.h           |   1 +
src/include/nodes/relation.h            |   1 +
src/include/optimizer/pathnode.h        |   3 +-
src/include/optimizer/planmain.h        |   2 +-
src/include/parser/parse_agg.h          |   6 +
25 files changed, 794 insertions(+), 193 deletions(-)