Re: A couple questions about ordered-set aggregates

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A couple questions about ordered-set aggregates
Date: 2020-10-30 23:49:48
Message-ID: 20201030234948.kawgciecx4hyyud4@development
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Oct 25, 2020 at 09:32:22PM -0400, Chapman Flack wrote:
>I find I am allowed to create an ordered-set aggregate with a non-empty
>direct argument list and no finisher function. Am I right in thinking
>that's kind of nonsensical, as nothing will ever look at the direct args?
>
>Also, the syntax summary shows PARALLEL = { SAFE | RESTRICTED | UNSAFE }
>in the ordered-set syntax variant, since 9.6, though that variant
>accepts no combine/serial/deserial functions, and there's also
>a note saying "Partial (including parallel) aggregation is currently
>not supported for ordered-set aggregates."
>
>Does PARALLEL = { SAFE | RESTRICTED | UNSAFE } on an ordered-set
>aggregate affect anything?
>

I may be missing something, but I believe PARALLEL = SAFE simply means
it can be executed in the parallel part of the plan. That does not
require support for partial aggregation - we simply don't support
passing partial results to the leader, hence combine/serial/deserial
functions are not needed.

Not sure about the direct arguments.

regards

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-10-31 00:50:49 Re: Should the function get_variable_numdistinct consider the case when stanullfrac is 1.0?
Previous Message Tomas Vondra 2020-10-30 23:40:39 Re: Should the function get_variable_numdistinct consider the case when stanullfrac is 1.0?