Re: BUG #5066: plperl issues with perl_destruct() and END blocks

From: Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5066: plperl issues with perl_destruct() and END blocks
Date: 2009-09-28 20:23:01
Message-ID: 20090928202301.GF41016@timac.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Gierth 2009-09-28 22:14:47 Re: BUG #5084: Query gives different number of rows depending on ORDER BY
Previous Message Tom Lane 2009-09-28 20:02:57 Re: BUG #5084: Query gives different number of rows depending on ORDER BY