Re: BUG #5066: plperl issues with perl_destruct() and END blocks - Mailing list pgsql-bugs

From Tim Bunce
Subject Re: BUG #5066: plperl issues with perl_destruct() and END blocks
Date
Msg-id 20090928202301.GF41016@timac.local
Whole thread Raw
In response to Re: BUG #5066: plperl issues with perl_destruct() and END blocks  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Tue, Sep 22, 2009 at 10:13:24AM -0400, Tom Lane wrote:
>
> Another point that comes to mind is shared_preload_libraries: if plperl
> is loaded once in the postmaster, it seems entirely likely that the same
> END block would be executed in multiple backends after having been
> loaded only once.  Again, while that might be okay for his particular
> use-case, it seems horribly dangerous for anything else.

I agree with Robert that that would be expected behaviour for perl
users - but it would only apply for cases where END blocks had been
compiled by the postmaster.

> (The shared_preload_libraries case also destroys the most obvious
> implementation path, ie having plperl add an on_proc_exit callback
> at _PG_init time...)

Could you explain the problem? (I don't see it, but I'm not familar with
postgres internals.)

Tim.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5084: Query gives different number of rows depending on ORDER BY
Next
From: Andrew Gierth
Date:
Subject: Re: BUG #5084: Query gives different number of rows depending on ORDER BY