On Mon, Apr 4, 2016 at 10:26 PM, David Rowley <david.row...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers