Re: select count() out of memory - Mailing list pgsql-general

From Gregory Stark
Subject Re: select count() out of memory
Date
Msg-id 87y7drlc5o.fsf@oxford.xeocode.com
Whole thread Raw
In response to select count() out of memory  (tfinneid@student.matnat.uio.no)
Responses Re: select count() out of memory  (tfinneid@student.matnat.uio.no)
List pgsql-general
<tfinneid@student.matnat.uio.no> writes:

>
>     ERROR:  out of memory
>     DETAIL:  Failed on request of size 130.
>
> Does anybody have any suggestion as to which parameter I should tune to
> give it more memory to be able to perform queries on the root table?

This indicates that malloc() failed which means the system couldn't provide
any more memory. Either you have a very low memory ulimit (look at ulimit -a
in the same session as Postgres) or your machine is really low on memory.
Perhaps you have shared_buffers set very high or some other program is using
all your available memory (and swap)?

> The last parts of the db log is the following, I dont think anything other
> than the last 2 lines are relevant.

You're wrong. All the lines like:

> pg_attribute_relid_attnum_index: 1024 total in 1 blocks; 328 free (0
> chunks); 696 used

are a dump of Postgres's current memory allocations and could be useful in
showing if there's a memory leak causing this.

Also, what version of Postgres is this?

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

pgsql-general by date:

Previous
From: Ow Mun Heng
Date:
Subject: Re: Indexes & Primary Keys (based on the same columns)
Next
From: Gregory Stark
Date:
Subject: Re: [PGSQL v8.2.5] Similar queries behave differently