Skip site navigation (1) Skip section navigation (2)

Re: query memory consumption

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: Alan McKay <alan(dot)mckay(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: query memory consumption
Date: 2009-09-22 12:41:25
Message-ID: 2f4958ff0909220541g2275e815pcc84b16a023d166a@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
On Tue, Sep 22, 2009 at 1:36 PM, Alan McKay <alan(dot)mckay(at)gmail(dot)com> wrote:

> Too high?  How high is too high?

in a very simple scenario, you have 100 connections opened, and all of
them run the query that was the reason you bumped work_mem to 256M.
All of the sudden postgresql starts to complain about lack of ram,
because you told it it could use max of
work_mem*number_of_connections.

Best practice to avoid that, is to bump the work_mem temporarily
before the query, and than lower it again, lowers the chance of memory
exhaustion.


-- 
GJ

In response to

Responses

pgsql-performance by date

Next:From: Alan McKayDate: 2009-09-22 12:46:04
Subject: Re: query memory consumption
Previous:From: Alan McKayDate: 2009-09-22 12:36:51
Subject: Re: query memory consumption

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group