Re: Sort performance cliff with small work_mem - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Sort performance cliff with small work_mem
Date
Msg-id CAH2-Wz=jq+3WZWD1QcZf=uXAB_72pPzt8qQz3_EJX9bpYUDi7w@mail.gmail.com
Whole thread Raw
In response to Re: Sort performance cliff with small work_mem  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Wed, May 2, 2018 at 8:46 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Wed, May 2, 2018 at 11:38 AM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>> To fix, I propose that we change the above so that we always subtract
>> tapeSpace, but if there is less than e.g. 32 kB of memory left after that
>> (including, if it went below 0), then we bump availMem back up to 32 kB. So
>> we'd always reserve 32 kB to hold the tuples, even if that means that we
>> exceed 'work_mem' slightly.
>
> Sounds very reasonable.

+1

-- 
Peter Geoghegan


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Remove mention in docs that foreign keys on partitioned tablesare not supported
Next
From: Peter Eisentraut
Date:
Subject: Re: Is there a memory leak in commit 8561e48?