On Thu, Dec 3, 2015 at 6:06 PM, David Rowley <david.row...@2ndquadrant.com> wrote: > On 3 December 2015 at 19:24, Haribabu Kommi <kommi.harib...@gmail.com> > wrote: >> >> On Thu, Dec 3, 2015 at 4:18 PM, David Rowley >> <david.row...@2ndquadrant.com> wrote: >> > >> > Hi, >> > >> > I just wanted to cross post here to mark that I've posted an updated >> > patch >> > for combining aggregate states: >> > >> > http://www.postgresql.org/message-id/CAKJS1f9wfPKSYt8CG=t271xbymzjrzwqbjeixiqrf-olh_u...@mail.gmail.com >> > >> > I also wanted to check if you've managed to make any progress on >> > Parallel >> > Aggregation? I'm very interested in this myself and would like to >> > progress >> > with it, if you're not already doing so. >> >> Yes, the parallel aggregate basic patch is almost ready. >> This patch is based on your earlier combine state patch. >> I will post it to community with in a week or so. > > > That's great news! > > Also note that there's some bug fixes in the patch I just posted on the > other thread for combining aggregate states: > > For example: values[Anum_pg_aggregate_aggcombinefn - 1] = > ObjectIdGetDatum(combinefn); > was missing from AggregateCreate(). > > It might be worth diffing to the updated patch just to pull in anything else > that's changed.
Here I attached a POC patch of parallel aggregate based on combine aggregate patch. This patch contains the combine aggregate changes also. This patch generates and executes the parallel aggregate plan as discussed in earlier threads. Changes: 1. The aggregate reference in Finalize aggregate is getting overwritten with OUTER_VAR reference. But to do the final aggregate we need the aggregate here, so currently by checking the combine states it is avoided. 2. Check whether the aggregate functions that are present in the targetlist and qual can be executed parallel or not? Based on this the targetlist is formed to pass it to partial aggregate. 3. Replaces the seq scan as the lefttree with partial aggregate plan and generate full parallel aggregate plan. Todo: 1. Needs a code cleanup, it is just a prototype. 2. Explain plan with proper instrumentation data. 3. Performance test to observe the effect of parallel aggregate. 4. Need to separate combine aggregate patch with additional changes done. Regards, Hari Babu Fujitsu Australia
Description: Binary data
-- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers