Re: Out of memory on SELECT in 8.3.5

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Out of memory on SELECT in 8.3.5
Date: 2009-02-09 09:17:40
Message-ID: 498FF4B4.2020203@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Matt Magoffin wrote:
> We have 100+ postgres processes running, so for an individual process,
> could the 1024 file limit be doing anything to this query? Or would I see
> an explicit error message regarding this condition?
>
>

with 100 concurrent postgres connections, if they all did something
requiring large amounts of work_mem, you could allocate 100 * 125MB (I
believe thats what you said it was set to?) which is like 12GB :-O

in fact a single query thats doing multiple sorts of large datasets for
a messy join (or other similar activity) can involve several instances
of workmem. multiply that by 100 queries, and ouch.

have you considered using a connection pool to reduce the postgres
process count?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-02-09 09:28:01 Re: Out of memory on SELECT in 8.3.5
Previous Message Scara Maccai 2009-02-09 09:16:20 Re: complex custom aggregate function