Re: out of memory during query execution

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: DANTE ALEXANDRA <ALEXANDRA(dot)DANTE(at)BULL(dot)NET>
Cc: 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:35:01
Message-ID: 13416.1135179301@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

DANTE ALEXANDRA <ALEXANDRA(dot)DANTE(at)BULL(dot)NET> writes:
> In my case, does this mean that each one of the two hashs and sorts will
> take 64MB, so 192MB ?
> What do you want to say with "so the two hashes and sort would think
> they could use 3/4ths of the available heap" ?

Right, exactly. In this particular case I think the top-level sort is
not going to be using much memory because it won't see very many rows,
but potentially it could try to eat 64Mb just like each of the hashes.

Your log entries show that the hashes are actually eating over 100Mb
apiece. The memory space estimation for work_mem is not completely
accurate, and is not intended to be, but I would have liked to think
it would be closer than a factor-of-2 error. Might be worth looking
into exactly what's happening there.

> Last question, how can I see that my 32-bit AIX program being limited to
> 256MB of heap,

For that you need to talk to an AIX expert, which I'm not.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Seneca Cunningham 2005-12-21 15:48:03 Re: out of memory during query execution
Previous Message DANTE ALEXANDRA 2005-12-21 15:24:00 Re: out of memory during query execution