Re: sort_mem param of postgresql.conf

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
Cc: "Greg Smith" <gsmith(at)gregsmith(dot)com>, "pgSQL - General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: sort_mem param of postgresql.conf
Date: 2008-11-13 18:17:57
Message-ID: dcc563d10811131017l29e65601vabdd1699f3e4ee44@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2008/11/13 Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>:
> On Thu, Nov 13, 2008 at 7:59 AM, Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com> wrote:
>>
>>
>> On Wed, Nov 12, 2008 at 11:08 PM, Greg Smith <gsmith(at)gregsmith(dot)com> wrote:
>>>
>>> Be advised that the work_mem setting (and its deprecated alias sort_mem)
>>> are on a per-client basis. So if you have a bunch of people running reports
>>> with that setting, you might discover your server running out of memory;
>>> that's a really high setting. Generally, if it's only a report or two that
>>> need a lot more working memory for sorts, you can do this at the beginning
>>> of them instead:
>>>
>>> set work_mem='512MB';
>>
>> so how do I change it back to default (without knowing what the previous val
>> was). I suppose having it in a transaction won't do :P
>
> default is 1M, but you can safely run 8 to 16 Meg with your setup.

Wait I might be confusing you with someone else. What's your
machine's mem, how much is shared_buffers, and what's your
max_connections?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Phoenix Kiula 2008-11-13 18:59:18 Tweaking PG (again)
Previous Message Scott Marlowe 2008-11-13 18:15:18 Re: sort_mem param of postgresql.conf