mirror of
https://github.com/postgres/postgres.git
synced 2025-08-11 04:22:52 +03:00
Support parallel aggregation.
Parallel workers can now partially aggregate the data and pass the transition values back to the leader, which can combine the partial results to produce the final answer. David Rowley, based on earlier work by Haribabu Kommi. Reviewed by Álvaro Herrera, Tomas Vondra, Amit Kapila, James Sewell, and me.
This commit is contained in:
src
backend
executor
nodes
optimizer
path
plan
prep
util
parser
include
@@ -1233,6 +1233,7 @@ _copyAggref(const Aggref *from)
|
||||
|
||||
COPY_SCALAR_FIELD(aggfnoid);
|
||||
COPY_SCALAR_FIELD(aggtype);
|
||||
COPY_SCALAR_FIELD(aggoutputtype);
|
||||
COPY_SCALAR_FIELD(aggcollid);
|
||||
COPY_SCALAR_FIELD(inputcollid);
|
||||
COPY_NODE_FIELD(aggdirectargs);
|
||||
|
@@ -192,6 +192,7 @@ _equalAggref(const Aggref *a, const Aggref *b)
|
||||
{
|
||||
COMPARE_SCALAR_FIELD(aggfnoid);
|
||||
COMPARE_SCALAR_FIELD(aggtype);
|
||||
COMPARE_SCALAR_FIELD(aggoutputtype);
|
||||
COMPARE_SCALAR_FIELD(aggcollid);
|
||||
COMPARE_SCALAR_FIELD(inputcollid);
|
||||
COMPARE_NODE_FIELD(aggdirectargs);
|
||||
|
@@ -57,7 +57,7 @@ exprType(const Node *expr)
|
||||
type = ((const Param *) expr)->paramtype;
|
||||
break;
|
||||
case T_Aggref:
|
||||
type = ((const Aggref *) expr)->aggtype;
|
||||
type = ((const Aggref *) expr)->aggoutputtype;
|
||||
break;
|
||||
case T_GroupingFunc:
|
||||
type = INT4OID;
|
||||
|
@@ -1033,6 +1033,7 @@ _outAggref(StringInfo str, const Aggref *node)
|
||||
|
||||
WRITE_OID_FIELD(aggfnoid);
|
||||
WRITE_OID_FIELD(aggtype);
|
||||
WRITE_OID_FIELD(aggoutputtype);
|
||||
WRITE_OID_FIELD(aggcollid);
|
||||
WRITE_OID_FIELD(inputcollid);
|
||||
WRITE_NODE_FIELD(aggdirectargs);
|
||||
|
@@ -552,6 +552,7 @@ _readAggref(void)
|
||||
|
||||
READ_OID_FIELD(aggfnoid);
|
||||
READ_OID_FIELD(aggtype);
|
||||
READ_OID_FIELD(aggoutputtype);
|
||||
READ_OID_FIELD(aggcollid);
|
||||
READ_OID_FIELD(inputcollid);
|
||||
READ_NODE_FIELD(aggdirectargs);
|
||||
|
Reference in New Issue
Block a user