Re: tuplesort memory usage: grow_memtuples

From: Greg Stark <stark(at)mit(dot)edu>
To: Peter Geoghegan <peter(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tuplesort memory usage: grow_memtuples
Date: 2012-11-15 19:54:25
Message-ID: CAM-w4HMNnpWs1mLOhGx_RqnGY5WiOkPp2YaPyN=pEu-9jef+bQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 15, 2012 at 7:36 PM, Peter Geoghegan <peter(at)2ndquadrant(dot)com> wrote:
> On 15 November 2012 19:16, Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Browne 2012-11-15 20:02:19 Re: feature proposal - triggers by semantics
Previous Message Darren Duncan 2012-11-15 19:53:06 Re: feature proposal - triggers by semantics