From: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
---|---|
To: | serge(at)rielau(dot)com, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Jeff Davis <pgsql(at)j-davis(dot)com> |
Subject: | Re: Spilling hashed SetOps and aggregates to disk |
Date: | 2018-06-05 13:57:15 |
Message-ID: | 614905b5-9fb9-7a9c-5cb6-02d6876e109b@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 06/05/2018 03:41 PM, serge(at)rielau(dot)com wrote:
> In our code base we have added a WithStats-Flavor for creating memory
> contexts.
> This api accepts a pointer to metric for accounting and it is inherited
> by all subcontexts unless overridden.
> So we only needed to change context creation API where we wanted (such
> as TopTansactionContext, Message Context, ..)
> That's quite trivial, actually.
I think that's pretty much what we tried when this patch was first
discussed in 2015, but it added measurable overhead (1-3%) even when the
accounting was disabled. Which is not quite desirable, of course.
> Also we have fixed all those missing hash spills - albeit based on the
> 9.6 hash table design I think.
I don't think this part of the code changed all that much.
> If there is interest by the community we are very willing to share.
Absolutely! I think it'd be great to share both the code and the
reasoning behind the design.
> Cheers
> Serge
> Salesforce
cheers
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2018-06-05 14:05:32 | Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager |
Previous Message | Alexander Korotkov | 2018-06-05 13:45:19 | Locking B-tree leafs immediately in exclusive mode |