Re: Partial aggregates pushdown - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject Re: Partial aggregates pushdown
Date
Msg-id CAGECzQSB-Y=WGe4bGA7+cxLTrkuz8t_x+kpgJS+NP4mP0gVSFg@mail.gmail.com
Whole thread Raw
In response to Re: Partial aggregates pushdown  (Jelte Fennema-Nio <postgres@jeltef.nl>)
List pgsql-hackers
SUMMARY OF THREAD

The design of patch 0001 is agreed upon by everyone on the thread (so
far). This adds the PARTIAL_AGGREGATE label for aggregates, which will
cause the finalfunc not to run. It also starts using PARTIAL_AGGREGATE
for pushdown of aggregates in postgres_fdw. In 0001 PARTIAL_AGGREGATE
is only supported for aggregates with a non-internal/pseudo type as
the stype.

The design for patch 0002 is still under debate. This would expand on
the functionality added by adding support for PARTIAL_AGGREGATE for
aggregates with an internal stype. This is done by returning a byte
array containing the bytes that the serialfunc of the aggregate
returns.

A competing proposal for 0002 is to instead change aggregates to not
use an internal stype anymore, and create dedicated types. The main
downside here is that infunc and outfunc would need to be added for
text serialization, in addition to the binary serialization. An open
question is: Can we change the requirements for CREATE TYPE, so that
types can be created without infunc and outfunc.

WHAT IS NEEDED?

The things needed for this patch are that docs need to be added, and
detailed codereview needs to be done.

Feedback from more people on the two competing proposals for 0002
would be very helpful in making a decision.



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Windows default locale vs initdb
Next
From: Nazir Bilal Yavuz
Date:
Subject: Re: CREATE DATABASE with filesystem cloning