Re: oversight in parallel aggregate - Mailing list pgsql-hackers

From Robert Haas
Subject Re: oversight in parallel aggregate
Date
Msg-id CA+TgmoaWrokpAepozGOXBzApmR_U4cAc0YYeWmkRMw-FYcMdwg@mail.gmail.com
Whole thread Raw
In response to Re: oversight in parallel aggregate  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers
On Mon, Apr 4, 2016 at 10:26 PM, David Rowley
<david.rowley@2ndquadrant.com> wrote:
> Does this need to check the parallel flags on the transfn or serialfn?
> these'll be executed on the worker process. Possibly we also need the
> combinefn/deserialfn/finalfn to be checked too as I see that we do
> generate_gather_paths() from set_append_rel_pathlist().

That's basically the same as Tom's question, I think.  For right now,
I'd like to regard the aggregate function's pg_proc marking as
certifying that the entire aggregate can be trusted to be
parallel-safe.  That's cheap and easy to check.  If, in the future, we
want to allow more complicated things where some but not all of
aggregate's functions are parallel-safe, we can add logic for that
then - i.e. if the aggregate is labeled as parallel-restricted, then
inquire within.  But to be honest, I hope we won't get there.  As it
is, the list of things that you might want to do in an aggregate that
are parallel-unsafe is pretty short, and I hope we're going to go in
the direction of making even more things parallel-safe in the future.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Yet another small patch - reorderbuffer.c:1099
Next
From: Amit Kapila
Date:
Subject: Re: Support for N synchronous standby servers - take 2