Re: Out of memory error, FreeBSD 6.2, PostgreSQL 8.2.4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: J(dot)Kraaijeveld(at)Askesis(dot)nl
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Out of memory error, FreeBSD 6.2, PostgreSQL 8.2.4
Date: 2007-08-31 14:14:32
Message-ID: 23422.1188569672@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Joost Kraaijeveld" <J(dot)Kraaijeveld(at)Askesis(dot)nl> writes:
> I have a query that has run on 3 other *identical* machines (hardware,
> software, postgresql.conf idenntical, just other data in the database)
> that give me an "out of memory error" every time I try (see below).

> Anyone any idea of where or how to look for the problem or the
> solution?

What have you got work_mem set to?

The problem evidently is that a hash join table has gotten too large:

> HashBatchContext: 533741652 total in 76 blocks; 1376 free (74 chunks); 533740276 used

Now that's supposed to not get bigger than work_mem (plus or minus some
slop), so either you're trying to run with work_mem of half a gig or
more (answer: don't do that) or you've found some kind of memory leak
(answer: send a reproducible test case to pgsql-bugs).

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Phoenix Kiula 2007-08-31 14:34:57 Re: URGENT: Whole DB down ("no space left on device")
Previous Message Martijn van Oosterhout 2007-08-31 13:54:16 Re: Obtaining random rows from a result set