Re: pl/perl interpreter instance(s) - how long does it persist? - Mailing list pgsql-general

From Toby Corkindale
Subject Re: pl/perl interpreter instance(s) - how long does it persist?
Date
Msg-id 4D0042AA.40400@strategicdata.com.au
Whole thread Raw
In response to Re: pl/perl interpreter instance(s) - how long does it persist?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On 09/12/10 13:37, Tom Lane wrote:
> Toby Corkindale<toby.corkindale@strategicdata.com.au>  writes:
>> I would like to know how long the pl/perl interpreter instances persist?
>
> Till end of session.

Where session = connection (whether from psql, DBI, etc), yes?


>> Initial testing seems to give me contrary results.
>> In some cases, creating a new DB then loading the same module in a new
>> stored procedure will get the old version.
>> But in some other cases, the new DB will pick up the new version of the
>> module.
>
> "Creating a DB" doesn't affect the current session ... where in there
> did you reconnect?


To be honest, I'm not 100% sure I was reconnecting. I think I had it in
my head that the perl instance would be related to role or database, so
was creating new databases with new roles and testing code straight away.

I thought I tried reconnecting, since that's obvious too, and in my
limited local testing that seems to work; in staging/production environs
its trickier to bounce the apps, so maybe I haven't been restarting them
when I thought I was.

Thanks for the advice; it sounds like I have been missing the obvious
here, so will head off and do some more checking.

Thanks for the quick response!
Toby

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pl/perl interpreter instance(s) - how long does it persist?
Next
From: Vincent Veyron
Date:
Subject: Re: How to obtain the maximum value of a date, between 3 tables...