Fix parallel-safety code for parallel aggregation.
Robert Haas <rhaas@postgresql.org>
Fix parallel-safety code for parallel aggregation. has_parallel_hazard() was ignoring the proparallel markings for aggregates, which is no good. Fix that. There was no way to mark an aggregate as actually being parallel-safe, either, so add a PARALLEL option to CREATE AGGREGATE. Patch by me, reviewed by David Rowley.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/create_aggregate.sgml | modified | +9 −0 |
| src/backend/catalog/pg_aggregate.c | modified | +3 −2 |
| src/backend/commands/aggregatecmds.c | modified | +20 −1 |
| src/backend/commands/functioncmds.c | modified | +2 −3 |
| src/backend/optimizer/util/clauses.c | modified | +7 −0 |
| src/include/catalog/pg_aggregate.h | modified | +2 −1 |
| src/test/regress/expected/create_aggregate.out | modified | +10 −2 |
| src/test/regress/sql/create_aggregate.sql | modified | +10 −2 |