Re: Memory-Bounded Hash Aggregation - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Memory-Bounded Hash Aggregation
Date
Msg-id 5b8ca33e-0ccf-cc02-bae5-079120f56c4f@iki.fi
Whole thread Raw
In response to Re: Memory-Bounded Hash Aggregation  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Memory-Bounded Hash Aggregation  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
On 05/02/2020 21:56, Jeff Davis wrote:
> On Tue, 2020-02-04 at 18:10 +0200, Heikki Linnakangas wrote:
>> I'd love to change the LogicalTape API so that you could allocate
>> and
>> free tapes more freely. I wrote a patch to do that, as part of
>> replacing
>> tuplesort.c's polyphase algorithm with a simpler one (see [1]), but
>> I
>> never got around to committing it. Maybe the time is ripe to do that
>> now?
> 
> It's interesting that you wrote a patch to pause the tapes a while ago.
> Did it just fall through the cracks or was there a problem with it?
> 
> Is pause/resume functionality required, or is it good enough that
> rewinding a tape frees the buffer, to be lazily allocated later?

It wasn't strictly required for what I was hacking on then. IIRC it 
would have saved some memory during sorting, but Peter G felt that it 
wasn't worth the trouble, because he made some other changes around the 
same time, which made it less important 
(https://www.postgresql.org/message-id/CAM3SWZS0nwOPoJQHvxugA9kKPzky2QC2348TTWdSStZOkke5tg%40mail.gmail.com). 
I dropped the ball on both patches then, but I still think they would be 
worthwhile.

- Heikki




pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: Identifying user-created objects
Next
From: Michael Paquier
Date:
Subject: Re: Identifying user-created objects