Re: tuplesort memory usage: grow_memtuples - Mailing list pgsql-hackers

From Greg Stark
Subject Re: tuplesort memory usage: grow_memtuples
Date
Msg-id CAM-w4HMNnpWs1mLOhGx_RqnGY5WiOkPp2YaPyN=pEu-9jef+bQ@mail.gmail.com
Whole thread Raw
In response to Re: tuplesort memory usage: grow_memtuples  (Peter Geoghegan <peter@2ndquadrant.com>)
Responses Re: tuplesort memory usage: grow_memtuples
Re: tuplesort memory usage: grow_memtuples
List pgsql-hackers
On Thu, Nov 15, 2012 at 7:36 PM, Peter Geoghegan <peter@2ndquadrant.com> wrote:
> On 15 November 2012 19:16, Robert Haas <robertmhaas@gmail.com> wrote:
>> So what's next here?  Do you want to work on these issue some more?
>> Or does Jeff?  I'd like to see this go in, but I'm not sure I have the
>> bandwidth to do the legwork myself.
>
> I'll take another look. No elegant solution immediately occurs to me, though.

The overflow was trivial to fix.

The only concern I had was about the behaviour after it did the
special case. I didn't want it to keep doing the math and trying to
grow again a little bit every tuple. I think I was leaning to putting
the magic flag back. The alternative is to only do the one-off grow if
we can grow at least some arbitrary percentage like 10% or something
like that. But it seems like a lot of arithmetic to be doing each time
around for probably no gain.


-- 
greg



pgsql-hackers by date:

Previous
From: Darren Duncan
Date:
Subject: Re: feature proposal - triggers by semantics
Next
From: Christopher Browne
Date:
Subject: Re: feature proposal - triggers by semantics