Re: ERROR: Memory exhausted in AllocSetAlloc(188)

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: ERROR: Memory exhausted in AllocSetAlloc(188)
Date: 2003-05-21 19:17:48
Message-ID: 20030521191748.GN40542@flake.decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Tue, May 20, 2003 at 12:58:41AM -0400, Tom Lane wrote:
> "Jim C. Nasby" <jim(at)nasby(dot)net> writes:
> > I'm having the same problem...
>
> How many rows would you expect this command to insert?
>
> You might be running into the fact that pending-trigger-call lists are
> kept in memory, but it's hard to tell without knowing the number of
> rows involved...

35M

I re-wrote the query to do a subselect instead of a full join (which
changed the access plan from a hash-join to a subquery), and it looks
like it might finish, but it's still using a heck of a lot of memory...

18252 jnasby 1 40 0 1135M 442M cpu1 290:03 48.07% postgres
19168 jnasby 1 60 0 62M 44M sleep 2:35 8.03% postgres

The second engine is typical of the other engines in terms of memory
usage. Also, I've seen some engines not releasing memory until
termination; there was one that was using 1.6G just sitting at the
prompt.

If it helps, that snapshot is with ~16M tuples in the table, according
to vacuum verbose (started with 0 tuples).
--
Jim C. Nasby (aka Decibel!) jim(at)nasby(dot)net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2003-05-21 19:22:34 Re: PostgreSQL Performance on OpenBSD
Previous Message alex b. 2003-05-21 18:26:55 Re: caching query results

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-05-21 20:39:18 Re: ERROR: Memory exhausted in AllocSetAlloc(188)
Previous Message Alvaro Herrera 2003-05-21 18:53:43 Re: Removing width from EXPLAIN