Re: Parallel Aggregate

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Parallel Aggregate
Дата
Msg-id CA+TgmoY9S6j5bV7hAye5MW7FRzq-FMeCXwX84NGN6VmPbavJEw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Parallel Aggregate  (David Rowley <david.rowley@2ndquadrant.com>)
Ответы Re: Parallel Aggregate  (David Rowley <david.rowley@2ndquadrant.com>)
Список pgsql-hackers
On Wed, Mar 16, 2016 at 5:05 PM, David Rowley
<david.rowley@2ndquadrant.com> wrote:
>> Cool!  Why not initialize aggpartialtype always?
>
> Because the follow-on patch sets that to either the serialtype or the
> aggtranstype, depending on if serialisation is required. Serialisation
> is required for parallel aggregate, but if we're performing the
> partial agg in the main process, then we'd not need to do that. This
> could be solved by adding more fields to AggRef to cover the
> aggserialtype and perhaps expanding aggpartial into an enum mode which
> allows NORMAL, PARTIAL, PARTIAL_SERIALIZE, and have exprType() pay
> attention to the mode and return 1 of the 3 possible types.

Urk.  That might still be better than what you have right now, but
it's obviously not great.  How about ditching aggpartialtype and
adding aggoutputtype instead?  Then you can always initialize that to
whatever it's supposed to be based on the type of aggregation you are
doing, and exprType() can simply return that field.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: Re: POC, WIP: OR-clause support for indexes
Следующее
От: Stas Kelvich
Дата:
Сообщение: Re: Speedup twophase transactions