Re: oversight in parallel aggregate

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Subject: Re: oversight in parallel aggregate
Date: 2016-04-05 02:35:36
Message-ID: 2582.1459823736@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> One of my EDB colleagues, while in the process of refactoring some
> unrelated Advanced Server code, discovered that (1) there's no way to
> mark an aggregate as anything other than parallel-unsafe but (2) it
> doesn't matter because has_parallel_hazard ignores Aggrefs anyway.
> These mistakes cancel each other out (sorta) if all of your aggregates
> happen to be parallel-safe, but otherwise not so much. Barring
> objections, I intend to speedily apply the attached patch to fix this.

Um ... why is it a good idea to attach a parallel-safe annotation to an
aggregate as such, rather than relying on the parallel-safe annotations
of its implementation functions?

This seems not entirely academic, since perhaps the functions are not
all marked the same; which might be sensible. Perhaps the transition
function can be pushed down but not the final function.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-04-05 02:39:40 Re: Re: [COMMITTERS] pgsql: Add trigonometric functions that work in degrees.
Previous Message Noah Misch 2016-04-05 02:31:38 Re: Default Roles (was: Additional role attributes)