Обсуждение: changing work_mem

Поиск
Список
Период
Сортировка

changing work_mem

От
Dinesh Bhandary
Дата:
Hi All -

Is there a way to change work_mem for a session in postgres without
restarting a database? Please let me know.

Thanks.
Dinesh

Re: changing work_mem

От
"Kevin Grittner"
Дата:
Dinesh Bhandary <dbhandary@iii.com> wrote:

> Is there a way to change work_mem for a session in postgres
> without restarting a database? Please let me know.

SET work_mem

http://www.postgresql.org/docs/9.0/interactive/sql-set.html

-Kevin

Re: changing work_mem

От
"Plugge, Joe R."
Дата:
Yes,

In your session ....

set work_mem='4000MB';do rest of sql after .....

-----Original Message-----
From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Dinesh Bhandary
Sent: Monday, June 13, 2011 11:29 AM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] changing work_mem

Hi All -

Is there a way to change work_mem for a session in postgres without restarting a database? Please let me know.

Thanks.
Dinesh

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: changing work_mem

От
Chris Ernst
Дата:
SET work_mem='1GB';   (or whatever size makes sense)

    - Chris

On 06/13/2011 10:29 AM, Dinesh Bhandary wrote:
> Hi All -
>
> Is there a way to change work_mem for a session in postgres without
> restarting a database? Please let me know.
>
> Thanks.
> Dinesh
>


Re: changing work_mem

От
Scott Marlowe
Дата:
On Mon, Jun 13, 2011 at 10:29 AM, Dinesh Bhandary <dbhandary@iii.com> wrote:
> Hi All -
>
> Is there a way to change work_mem for a session in postgres without
> restarting a database? Please let me know.

In addition the standard set work_mem='512MB'; listed above, you can
make such changes sticky for a user or a database:

alter user bubba set work_mem='1000MB';
alter database reports set work_mem='256MB';