Re: Transaction eating up all RAM

From: "Peter" <peter(at)greatnowhere(dot)com>
To:
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Transaction eating up all RAM
Date: 2006-03-13 17:43:25
Message-ID: 01c501c646c5$a18ad610$a502a8c0@komtek.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

>> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2006-03-13 17:50:02 Re: Possible infinite loop in query using bitmap scans
Previous Message Andreas Kretschmer 2006-03-13 16:46:50 Re: dump from old version

Browse pgsql-hackers by date

  From Date Subject
Next Message Rodrigo Hjort 2006-03-13 17:56:00 Restoring a Full Cluster on a Different Architecture (32 x 64)
Previous Message Magnus Hagander 2006-03-13 17:27:03 Re: [PERFORM] Hanging queries on dual CPU windows