Re: Spilling hashed SetOps and aggregates to disk - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Spilling hashed SetOps and aggregates to disk
Date
Msg-id 20180605124538.qeavfl5drp7wfvr3@alap3.anarazel.de
Whole thread Raw
In response to Re: Spilling hashed SetOps and aggregates to disk  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: Spilling hashed SetOps and aggregates to disk
List pgsql-hackers
Hi,

On 2018-06-05 09:35:13 +0200, Tomas Vondra wrote:
> But I don't think we've considered copying the whole AllocSet. Maybe that
> would work, not sure.

Don't think you'd need to fully copy it - you can just have a "wrapper"
memory context implementation that does the accounting and then hands
the actual work to AllocSet. That limits some things it can account for,
but I don't see those being really relevant.

> I wonder if an aggregate might use a custom context
> internally (I don't recall anything like that). The accounting capability
> seems potentially useful for other places, and those might not use AllocSet
> (or at least not directly).

Yea, that seems like a big issue.

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Spilling hashed SetOps and aggregates to disk
Next
From: Andres Freund
Date:
Subject: Re: Spilling hashed SetOps and aggregates to disk