Re: Partial aggregates pushdown

From: Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Ilya Gladyshev <i(dot)gladyshev(at)postgrespro(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Partial aggregates pushdown
Date: 2021-11-15 13:01:51
Message-ID: 2ed9ad03bc17cfb86da900d541a270b0@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Daniel Gustafsson писал 2021-11-15 13:16:
>> On 3 Nov 2021, at 15:50, Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru>
>> wrote:
>>
>> Daniel Gustafsson писал 2021-11-03 16:45:
>>>> On 2 Nov 2021, at 10:12, Alexander Pyhalov
>>>> <a(dot)pyhalov(at)postgrespro(dot)ru> wrote:
>>>> Updated and rebased patch.
>>> + state = (Int128AggState *) palloc0(sizeof(Int128AggState));
>>> + state->calcSumX2 = false;
>>> +
>>> + if (!PG_ARGISNULL(0))
>>> + {
>>> +#ifdef HAVE_INT128
>>> + do_int128_accum(state, (int128) PG_GETARG_INT64(0));
>>> +#else
>>> + do_numeric_accum(state, int64_to_numeric(PG_GETARG_INT64(0)));
>>> +#endif
>>> This fails on non-INT128 platforms as state cannot be cast to
>>> Int128AggState
>>> outside of HAVE_INT128; it's not defined there. This needs to be a
>>> PolyNumAggState no?
>>
>> Hi.
>> Thank you for noticing this. It's indeed fails with
>> pgac_cv__128bit_int=no.
>> Updated patch.
>
> The updated patch also fails to apply now, but on the catversion.h
> bump. To
> avoid having to rebase for that I recommend to skip that part in the
> patch and
> just mention the need in the thread, any committer picking this up for
> commit
> will know to bump the catversion so there is no use in risking
> unneccesary
> conflicts.

I've updated patch - removed catversion dump.

--
Best regards,
Alexander Pyhalov,
Postgres Professional

Attachment Content-Type Size
0001-Partial-aggregates-push-down-v07.patch text/x-diff 57.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2021-11-15 13:13:32 Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error
Previous Message torikoshia 2021-11-15 12:59:15 Re: RFC: Logging plan of the running query