On Thu, 25 Jul 2019 at 06:52, Andres Freund <and...@anarazel.de> wrote: > Now that master is open for development, and you have a commit bit, are > you planning to go forward with this on your own?
I plan to, but it's not a high priority at the moment. I'd like to do much more in nodeAgg.c, TBH. It would be good to remove some code from nodeAgg.c and put it in the planner. I'd like to see: 1) Planner doing the Aggref merging for aggregates with the same transfn etc. 2) Planner trying to give nodeAgg.c a sorted path to work with on DISTINCT / ORDER BY aggs 3) Planner providing nodeAgg.c with the order that the aggregates should be evaluated in order to minimise sorting for DISTINCT / ORDER BY aggs. I'd take all those up on a separate thread though. If you're in a rush to see the cleanup proposed a few months ago then please feel free to take it up. It might be a while before I can get a chance to look at it again. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services