Re: Out of memory for Select query. - Mailing list pgsql-performance

From Rusty Conover
Subject Re: Out of memory for Select query.
Date
Msg-id ABE8D033-9127-495A-B96D-0D74FF9B232E@infogears.com
Whole thread Raw
In response to Out of memory for Select query.  ("Nimesh Satam" <nimesh.zedo@gmail.com>)
List pgsql-performance

On Jun 29, 2008, at 10:20 PM, Nimesh Satam wrote:

> All,
>
> While running a Select query we get the below error:
>
> ERROR:  out of memory
> DETAIL:  Failed on request of size 192.
>
> Postgres Conf details:
> shared_buffers = 256000
> work_mem =150000
> max_stack_depth = 16384
> max_fsm_pages = 400000
> version: 8.1.3
>
> We are using 8gb of Primary memory for the server which is used as a
> dedicated database machine.
>
> The data log shows the below message after getting the Out of memory
> error. Also attached the explain for the query. Can someone let us
> know , if have some worng parameter setup or any solution to the
> problem?
>
> Regards,
> Nimesh.
>


Hi Nimesh,

I'd try decreasing work_mem (try something smaller like 16384 and work
up if you'd like), since you have lots of hashes being built for this
query, you may simply be running into a limit on process size
depending on your platform.  Also look at "ulimit -a" as the postgres
user to make sure you aren't running into any administrative limits.

Cheers,

Rusty
--
Rusty Conover
InfoGears Inc.
http://www.infogears.com


pgsql-performance by date:

Previous
From: Rusty Conover
Date:
Subject: Re: Subquery WHERE IN or WHERE EXISTS faster?
Next
From: Moritz Onken
Date:
Subject: Re: Planner should use index on a LIKE 'foo%' query