Re: out of memory during query execution

From: Seneca Cunningham <scunning(at)ca(dot)afilias(dot)info>
To: DANTE ALEXANDRA <ALEXANDRA(dot)DANTE(at)BULL(dot)NET>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kevin Murphy <murphy(at)genome(dot)chop(dot)edu>, Chris Browne <cbbrowne(at)acm(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: out of memory during query execution
Date: 2005-12-21 15:48:03
Message-ID: 43A97933.1090307@ca.afilias.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

DANTE ALEXANDRA wrote:
> Last question, how can I see that my 32-bit AIX program being limited to
> 256MB of heap, as the user "pg_810" used to launch the postmaster got
> when I execute the "ulimit -a" command :
> $ ulimit -a
> time(seconds) unlimited
> file(blocks) unlimited
> data(kbytes) unlimited
> stack(kbytes) unlimited
> memory(kbytes) unlimited
> coredump(blocks) unlimited
> nofiles(descriptors) 2000

It's actually less than 256MB of heap. When I saw your ./configure, I
noticed that no special options were passed to the linker, so you're
using the default 32-bit memory model. Even an unlimited ulimit does
not allow for more memory than the model sets aside.

You can try setting the environment variable LDR_CNTRL to
MAXDATA=0x40000000 (where the first digit is the number of 256MB
segments to allocate to heap, max 8) before starting the postmaster, at
the cost of reducing the amount of shared memory addressable by postgres.

Diagram of default memory model (Figure 3-3):
<http://www.redbooks.ibm.com/redbooks/SG245674/images/11-08-05.jpg>

The redbook it's from, "Developing and Porting C and C++ Applications on
AIX":
<http://www.redbooks.ibm.com/redbooks/SG245674/>

--
Seneca Cunningham
scunning(at)ca(dot)afilias(dot)info

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2005-12-21 16:04:34 Re: [GENERAL] Converting seconds past midnight to a time
Previous Message Tom Lane 2005-12-21 15:35:01 Re: out of memory during query execution