Re: Partial aggregates pushdown - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Partial aggregates pushdown
Date
Msg-id fcfe87cf-af04-ba91-0ca0-cd788fc30af1@enterprisedb.com
Whole thread Raw
In response to Re: Partial aggregates pushdown  (Alexander Pyhalov <a.pyhalov@postgrespro.ru>)
Responses Re: Partial aggregates pushdown
List pgsql-hackers
On 21.10.21 12:55, Alexander Pyhalov wrote:
> Now aggregates with internal states can be pushed down, if they are 
> marked as pushdown safe (this flag is set to true for min/max/sum),
> have internal states and associated converters. Converters are called 
> locally, they transform aggregate result to serialized internal 
> representation.
> As converters don't have access to internal aggregate state, partial 
> aggregates like avg() are still not pushable.

It seems to me that the system should be able to determine from the 
existing aggregate catalog entry whether an aggregate can be pushed 
down.  For example, it could check aggtranstype != internal and similar. 
  A separate boolean flag should not be necessary.  Or if it is, the 
patch should provide some guidance about how an aggregate function 
author should set it.



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Fix C4819 warning in MSVC
Next
From: Amit Kapila
Date:
Subject: Re: Added schema level support for publication.