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

Re: Out of memory for Select query.

From: Rusty Conover <rconover(at)infogears(dot)com>
To: Nimesh Satam <nimesh(dot)zedo(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org, nsatam(at)zedo(dot)com
Subject: Re: Out of memory for Select query.
Date: 2008-06-30 06:59:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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.


Rusty Conover
InfoGears Inc.

In response to

pgsql-performance by date

Next:From: Moritz OnkenDate: 2008-06-30 07:16:44
Subject: Re: Planner should use index on a LIKE 'foo%' query
Previous:From: Rusty ConoverDate: 2008-06-30 06:50:27
Subject: Re: Subquery WHERE IN or WHERE EXISTS faster?

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