Re: [HACKERS] Parallel Aggregation support for aggregate functionsthat use transitions not implemented for array_agg - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [HACKERS] Parallel Aggregation support for aggregate functionsthat use transitions not implemented for array_agg
Date
Msg-id 20170607034833.a2qno3eh4cuyjm2i@alap3.anarazel.de
Whole thread Raw
In response to Re: [HACKERS] Parallel Aggregation support for aggregate functionsthat use transitions not implemented for array_agg  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [HACKERS] Parallel Aggregation support for aggregate functions that use transitions not implemented for array_agg
List pgsql-hackers
On 2017-06-06 23:32:53 -0400, Peter Eisentraut wrote:
> On 6/6/17 13:52, Regina Obe wrote:
> > It seems CREATE  AGGREGATE was expanded in 9.6 to support parallelization of
> > aggregate functions using transitions, with the addition of serialfunc and
> > deserialfunc to the aggregate definitions.
> > 
> > https://www.postgresql.org/docs/10/static/sql-createaggregate.html
> > 
> > I was looking at the PostgreSQL 10 source code for some example usages of
> > this and was hoping that array_agg and string_agg would support the feature.
> 
> I'm not sure how you would parallelize these, since in most uses you
> want to have a deterministic output order.

Unless you specify ORDER BY you don't really have that anyway, consider
hash-aggregation.  If you want deterministic order, you really need an
ORDER BY inside the aggregate.

- Andres



pgsql-hackers by date:

Previous
From: "Tsunakawa, Takayuki"
Date:
Subject: Re: [HACKERS] Is ECPG's SET CONNECTION really not thread-aware?
Next
From: "Regina Obe"
Date:
Subject: Re: [HACKERS] Parallel Aggregation support for aggregate functions that use transitions not implemented for array_agg