Re: Postgres query completion status? - Mailing list pgsql-performance

From Fernando Hevia
Subject Re: Postgres query completion status?
Date
Msg-id AB1925220F644A5D887758FB10398986@iptel.com.ar
Whole thread Raw
In response to Re: Postgres query completion status?  (Richard Neill <rn214@cam.ac.uk>)
List pgsql-performance

> -----Mensaje original-----
> De: Richard Neill
>
> Fernando Hevia wrote:
> >
> >
> >> -----Mensaje original-----
> >> De: Richard Neill
> >>
> >>
> >> max_connections = 500                   # (change requires restart)
> >> work_mem = 256MB                                # min 64kB
> >
> > Not that it has to do with your current problem but this
> combination
> > could bog your server if enough clients run sorted queries
> simultaneously.
> > You probably should back on work_mem at least an order of magnitude.
> >
>
> What's the correct way to configure this?
>
> * We have one client which needs to run really big
> transactions (therefore needs the work memory).
>
> * We also have about 200 clients which run always very small,
> short queries.
>
> Richard
>

Set the default value at postgresql.conf much lower, probably 4MB.
And just before running any big transaction raise it for
the current session only issuing a:
  set work_mem = '256MB';

Regards,
Fernando.


pgsql-performance by date:

Previous
From: Richard Neill
Date:
Subject: Re: Postgres query completion status?
Next
From: marcin mank
Date:
Subject: Re: Postgres query completion status?