From: | Toby Corkindale <toby(dot)corkindale(at)strategicdata(dot)com(dot)au> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pl/perl object destruction (or lack thereof) at session end |
Date: | 2010-12-09 02:28:59 |
Message-ID: | 4D003EEB.8020009@strategicdata.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 09/12/10 13:00, Toby Corkindale wrote:
> Hi,
> Looking at this:
> http://www.postgresql.org/docs/9.0/interactive/plperl-under-the-hood.html
>
> Specifically, the "known limitations" part, I see it says:
> When a session ends normally, not due to a fatal error,
> any END blocks that have been defined are executed.
> Currently no other actions are performed. Specifically,
> file handles are not automatically flushed and objects are
> not automatically destroyed."
>
> So I wondered what implications that has for stored procedures that
> create objects? Will the following code cause a memory leak if called
> many times, due to the $big object never being destroyed?
>
>
> CREATE FUNCTION foobar() RETURNS trigger AS $$
> use Big::Module;
> my $big = Big::Module->new;
> $$ LANGUAGE plperlu
Perhaps I should test first and email later..
I couldn't see any memory leaking at all in some quick experimentation
(on pg 8.4.5).
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-12-09 02:37:30 | Re: pl/perl interpreter instance(s) - how long does it persist? |
Previous Message | Toby Corkindale | 2010-12-09 02:00:55 | pl/perl object destruction (or lack thereof) at session end |