mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
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.
This commit is contained in:
@ -871,6 +871,7 @@ _copyAgg(const Agg *from)
|
||||
COPY_SCALAR_FIELD(aggstrategy);
|
||||
COPY_SCALAR_FIELD(combineStates);
|
||||
COPY_SCALAR_FIELD(finalizeAggs);
|
||||
COPY_SCALAR_FIELD(serialStates);
|
||||
COPY_SCALAR_FIELD(numCols);
|
||||
if (from->numCols > 0)
|
||||
{
|
||||
|
@ -708,6 +708,7 @@ _outAgg(StringInfo str, const Agg *node)
|
||||
WRITE_ENUM_FIELD(aggstrategy, AggStrategy);
|
||||
WRITE_BOOL_FIELD(combineStates);
|
||||
WRITE_BOOL_FIELD(finalizeAggs);
|
||||
WRITE_BOOL_FIELD(serialStates);
|
||||
WRITE_INT_FIELD(numCols);
|
||||
|
||||
appendStringInfoString(str, " :grpColIdx");
|
||||
|
@ -1993,6 +1993,7 @@ _readAgg(void)
|
||||
READ_ENUM_FIELD(aggstrategy, AggStrategy);
|
||||
READ_BOOL_FIELD(combineStates);
|
||||
READ_BOOL_FIELD(finalizeAggs);
|
||||
READ_BOOL_FIELD(serialStates);
|
||||
READ_INT_FIELD(numCols);
|
||||
READ_ATTRNUMBER_ARRAY(grpColIdx, local_node->numCols);
|
||||
READ_OID_ARRAY(grpOperators, local_node->numCols);
|
||||
|
Reference in New Issue
Block a user