Re: beta1 & beta2 & Windows & heavy load - Mailing list pgsql-hackers

From Daniel Schuchardt
Subject Re: beta1 & beta2 & Windows & heavy load
Date
Msg-id 41447C19.4020401@web.de
Whole thread Raw
In response to Re: beta1 & beta2 & Windows & heavy load  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane schrieb:

> 
> Can you provide a concrete test case?
> 

houres later I'v located the problem. Its not heavy load but
subtransactions in Triggers. It's very easy to recreate:

the problem is this Syntax :
 CREATE OR REPLACE FUNCTION do_standard_mgc() RETURNS TRIGGER AS' BEGIN  BEGIN   --prob also occurs in this case (empty
subtransaction) EXCEPTIONWHEN OTHERS THEN    PERFORN NULL;  END;  RETURN new; END'LANGUAGE plpgsql;
 

It seems that this subtransactions allocates mem that is never freed. So 
create a big table with such a trigger - func (in my case after insert 
or update), do a begin and a update all over the table and postgres will 
use more and more memory as long there is memory available and then abort.

I can post a sample script but i think it's easy to recreate this prob.

Hope that helps,

Daniel.

BTW : how to ignore only duplicate - unique key exceptions?

is there sth like WHEN dup_unique_key THEN?



pgsql-hackers by date:

Previous
From: Mischa Sandberg
Date:
Subject: Re: Indexed views?
Next
From: Daniel Schuchardt
Date:
Subject: Re: beta1 & beta2 & Windows & heavy load