Re: Transaction eating up all RAM

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Peter" <peter(at)greatnowhere(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Transaction eating up all RAM
Date: 2006-03-13 16:04:16
Message-ID: 7789.1142265856@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

"Peter" <peter(at)greatnowhere(dot)com> writes:
> I have stored proc that retrieves a bunch of data, stores it in temp =
> table, computes all sorts of totals/averages/whatnots from the temp =
> table, and inserts results in another table. It works fine (except I =
> don't like wrapping all SQL statements in 'execute'), but multiple calls =
> to that proc from another procedure causes excessive memory usage =
> (upwards of 400M), and server eventually runs out of swap space. I =
> believe this is because PG caches transactions in RAM, and this =
> particular one is a bit too big.=20

Your belief is incorrect.

You could be looking at a memory-leak bug. Or, if there are foreign
keys involving the tables, you could be looking at the list of pending
foreign key trigger events getting too large. There's not enough
information here to say.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-03-13 16:18:36 Re: ERROR: FULL JOIN is only supported with merge-joinable join conditions
Previous Message Richard Broersma Jr 2006-03-13 15:57:53 Re: Wal -long transaction

Browse pgsql-hackers by date

  From Date Subject
Next Message Lukas Smith 2006-03-13 16:04:54 Re: DB2-style INS/UPD/DEL RETURNING
Previous Message Jonah H. Harris 2006-03-13 15:52:39 Re: DB2-style INS/UPD/DEL RETURNING