Re: Transaction eating up all RAM - Mailing list pgsql-general

From Peter
Subject Re: Transaction eating up all RAM
Date
Msg-id 01c501c646c5$a18ad610$a502a8c0@komtek.com
Whole thread Raw
In response to Transaction eating up all RAM  ("Peter" <peter@greatnowhere.com>)
Responses Re: Transaction eating up all RAM  ("Merlin Moncure" <mmoncure@gmail.com>)
Re: Transaction eating up all RAM  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
>> 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.

I have no triggers defined on any of the tables, and no foreign keys that
could cause cascaded updates and stuff. Care to see full text of the proc?
It's pl/PgPerlU

Peter


pgsql-general by date:

Previous
From: Emi Lu
Date:
Subject: Re: in Pl/PgSQL, do commit every 5000 records
Next
From: Harco de Hilster
Date:
Subject: Re: ERROR: FULL JOIN is only supported with merge-joinable