aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/util/pathnode.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2016-03-29 15:04:05 -0400
committerRobert Haas <rhaas@postgresql.org>2016-03-29 15:04:05 -0400
commit5fe5a2cee91117673e04617aeb1a38e305dcd783 (patch)
tree191e937efe0f15daf02c921935d740f429decada /src/backend/optimizer/util/pathnode.c
parent7f0a2c85fb221bae6908fb2fddad21a4c6d14438 (diff)
downloadpostgresql-5fe5a2cee91117673e04617aeb1a38e305dcd783.tar.gz
postgresql-5fe5a2cee91117673e04617aeb1a38e305dcd783.zip
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.
Diffstat (limited to 'src/backend/optimizer/util/pathnode.c')
-rw-r--r--src/backend/optimizer/util/pathnode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c
index 16b34fcf46a..89cae793ca3 100644
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -2433,7 +2433,8 @@ create_agg_path(PlannerInfo *root,
const AggClauseCosts *aggcosts,
double numGroups,
bool combineStates,
- bool finalizeAggs)
+ bool finalizeAggs,
+ bool serialStates)
{
AggPath *pathnode = makeNode(AggPath);
@@ -2458,6 +2459,7 @@ create_agg_path(PlannerInfo *root,
pathnode->qual = qual;
pathnode->finalizeAggs = finalizeAggs;
pathnode->combineStates = combineStates;
+ pathnode->serialStates = serialStates;
cost_agg(&pathnode->path, root,
aggstrategy, aggcosts,