3 Commits

Author SHA1 Message Date
Alexander Kuzmenkov
5c0110cbbf Mark partialize_agg as parallel safe
Postgres knows whether a given aggregate is parallel-safe, and creates
parallel aggregation plans based on that. The `partialize_agg` is a
wrapper we use to perform partial aggregation on data nodes. It is a
pure function that produces serialized aggregation state as a result.
Being pure, it doesn't influence parallel safety. This means we don't
need to mark it parallel-unsafe to artificially disable the parallel
plans for partial aggregation. They will be chosen as usual based on
the parallel-safety of the underlying aggregate function.
2022-05-31 14:53:58 +05:30
davidkohn88
bfd92ab822 Use CREATE OR REPLACE AGGREGATE
From PG12 on, CREATE OR REPLACE is supported for aggregates,
therefore, since we have dropped support for PG11, we can avoid
going through the rigamarole of having our aggregates in a separate
file from the functions we define to support them. Nor do we need to
handle aggregates separately from other functions as their creation
is now idempotent.
2021-07-01 07:40:46 +02:00
Matvey Arye
672c41755f Rename files to partialize_finalize
It's better to have more concrete names than just util_aggfns.

Also add TSDLLEXPORT where appropriate for windows.
2019-04-12 12:12:17 -04:00