From 16fd03e956540d1b47b743f6a84f37c54ac93dd4 Mon Sep 17 00:00:00 2001 From: David Rowley Date: Mon, 23 Jan 2023 17:35:01 +1300 Subject: Allow parallel aggregate on string_agg and array_agg This adds combine, serial and deserial functions for the array_agg() and string_agg() aggregate functions, thus allowing these aggregates to partake in partial aggregations. This allows both parallel aggregation to take place when these aggregates are present and also allows additional partition-wise aggregation plan shapes to include plans that require additional aggregation once the partially aggregated results from the partitions have been combined. Author: David Rowley Reviewed-by: Andres Freund, Tomas Vondra, Stephen Frost, Tom Lane Discussion: https://postgr.es/m/CAKJS1f9sx_6GTcvd6TMuZnNtCh0VhBzhX6FZqw17TgVFH-ga_A@mail.gmail.com --- src/include/parser/parse_agg.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include/parser') diff --git a/src/include/parser/parse_agg.h b/src/include/parser/parse_agg.h index d07b1621ddf..e9afd99d11f 100644 --- a/src/include/parser/parse_agg.h +++ b/src/include/parser/parse_agg.h @@ -35,6 +35,8 @@ extern Oid resolve_aggregate_transtype(Oid aggfuncid, Oid *inputTypes, int numArguments); +extern bool agg_args_support_sendreceive(Aggref *aggref); + extern void build_aggregate_transfn_expr(Oid *agg_input_types, int agg_num_inputs, int agg_num_direct_inputs, -- cgit v1.2.3