Re: ERROR: Memory exhausted in AllocSetAlloc(188) - Mailing list pgsql-general

From Tom Lane
Subject Re: ERROR: Memory exhausted in AllocSetAlloc(188)
Date
Msg-id 11768.1053549558@sss.pgh.pa.us
Whole thread Raw
In response to ERROR: Memory exhausted in AllocSetAlloc(188)  (Tilo Schwarz <mail.at.tilo.minus.schwarz.dot.de@remove_last_at.postgresql.org>)
Responses Re: ERROR: Memory exhausted in AllocSetAlloc(188)  ("Jim C. Nasby" <jim@nasby.net>)
List pgsql-general
"Jim C. Nasby" <jim@nasby.net> writes:
> On Tue, May 20, 2003 at 12:58:41AM -0400, Tom Lane wrote:
>> 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

Each pending deferred-trigger action takes about 40 bytes + palloc
overhead, probably 48 bytes altogether ... 48 * 35M comes to 1.68G, so
that's exactly where your problem is.  I'd suggest trying to commit the
changes in smaller batches ...

            regards, tom lane

pgsql-general by date:

Previous
From: Darko Prenosil
Date:
Subject: Re: caching query results
Next
From: Doug McNaught
Date:
Subject: Re: PostgreSQL Performance on OpenBSD