From: | "Jim C(dot) Nasby" <decibel(at)decibel(dot)org> |
---|---|
To: | Michael Fuhr <mike(at)fuhr(dot)org> |
Cc: | Lonni J Friedman <netllama(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: changing sort_mem on the fly? |
Date: | 2005-01-28 02:03:34 |
Message-ID: | 20050128020334.GQ67721@decibel.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Jan 27, 2005 at 06:23:05PM -0700, Michael Fuhr wrote:
> On Thu, Jan 27, 2005 at 06:23:21PM -0600, Jim C. Nasby wrote:
> >
> > If you just want to change it for one connection, you can do 'set
> > sort_mem=newvalue;'. You might need to be an admin to do it, though.
>
> Ordinary users can set sort_mem/work_mem, at least in 8.0.0 and
> earlier. Does setting that variable per session actually have an
> effect, and if it does, does allowing ordinary users to set it
> present a risk?
I ass-u-me that the setting actually takes effect. You could test it by
setting it high enough to send a system into swapping and run a query
that will use enough sort_mem. If it starts swapping, it worked. :)
Yes, there is a risk allowing ad-hoc settings; you can starve the
machine for memory.
--
Jim C. Nasby, Database Consultant decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"
From | Date | Subject | |
---|---|---|---|
Next Message | Jim C. Nasby | 2005-01-28 02:05:19 | Re: changing sort_mem on the fly? |
Previous Message | Lonni J Friedman | 2005-01-28 01:52:41 | Re: changing sort_mem on the fly? |