Re: EXPLAIN VERBOSE with parallel Aggregate

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: EXPLAIN VERBOSE with parallel Aggregate
Дата
Msg-id CAKJS1f_23gTiD3enzGKgs77uEq1AcO7OAxcisuVgVoqYhWTkvg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: EXPLAIN VERBOSE with parallel Aggregate  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: EXPLAIN VERBOSE with parallel Aggregate
Список pgsql-hackers
On 27 April 2016 at 08:46, Robert Haas <robertmhaas@gmail.com> wrote:
> My proposed fix for this issue is attached.  Review is welcome;
> otherwise, I'll just commit this.  The output looks like what I
> suggested upthread:

+ if (!aggref->aggpartial)
+ elog(ERROR, "referenced Aggref is not partial");

I think this is overly restrictive; ruleutils seems a bit out of line
here to say that plans can't have > 1 combine aggregate node.

When coding the combine aggs stuff I had test code to inject
additional combine paths to make sure everything worked as expected.
It did, but it won't if you add these two lines. I'd say just remove
them.

If you apply the attached and execute;

create table t1 (num int not null);
insert into t1 select generate_series(1,2000000);

explain verbose select avg(num) from t1;

You'll get;

ERROR: referenced Aggref is not partial

--
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Proposed change to make cancellations safe
Следующее
От: Robert Haas
Дата:
Сообщение: Re: SET ROLE and reserved roles