Cannot create an aggregate function with variadic parameters andenabled for parallel execution

Поиск
Список
Период
Сортировка
От Alexey Bashtanov
Тема Cannot create an aggregate function with variadic parameters andenabled for parallel execution
Дата
Msg-id f86dde87-fef4-71eb-0480-62754aaca01b@imap.cc
обсуждение исходный текст
Ответы Re: Cannot create an aggregate function with variadic parameters andenabled for parallel execution  (Alexey Bashtanov <bashtanov@imap.cc>)
Список pgsql-bugs
When trying to improve my extension Argm to work with parallel queries I 
found that
CREATE AGGREGATE wants serial/deserial/combine functions
to have variadic any parameter if the aggregate function itself is 
variadic any.
If I add the requested parameter, CREATE AGGREGATE still cannot find the 
function.

Having an analog of [m]finalfunc_extra for serial/deserial/combine functions
may be a good idea, but it's not yet there. So the attached patch makes 
postgres
skip the check for the parallel support functions.

I would appreciate if someone could have a look at the patch.
The problem is probably actual for 9.6+, so back-patch would be nice if 
there's no objections.

Should one be curious how to reproduce the problem, please clone 
https://github.com/bashtanov/argm/tree/parallel
and try make && make install && make installcheck. This fails without 
the patch, but works with it.
The error message is "function argmax_combine(internal, internal) must 
accept VARIADIC ANY to be used in this aggregate".
(Just in case: this "parallel" branch is a WIP, please use "master" 
branch if you need something stable).

Best regards,
   Alexey

Вложения

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Abnormal JSON query performance
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15194: Strange results were displayed for select query.