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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: David Fetter <david(at)fetter(dot)org>, Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5066: plperl issues with perl_destruct() and END blocks
Date: 2009-09-21 17:19:59
Message-ID: 603c8f070909211019y3ad8b0bfw8a1a2c16ab2714fa@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Sep 21, 2009 at 12:06 PM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> David Fetter escribió:
>
>> Taken literally, that would mean, "the last action before the backend
>> exits," but at least to me, that sounds troubling for the same reasons
>> that "end of transaction" triggers do.  What happens when there are
>> two different END blocks in a session?
>
> The manual is clear that both are executed.
>
>> With connection poolers, backends can last quite awhile.  Is it OK for
>> the END block to run hours after the rest of the code?
>
> This is an interesting point -- should END blocks be called on DISCARD ALL?

It seems pretty reasonable that it would. The intention of DISCARD
ALL is to completely reset the entire session.

...Robert

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2009-09-21 17:22:29 Re: BUG #5053: domain constraints still leak
Previous Message Alvaro Herrera 2009-09-21 17:06:17 Re: BUG #5066: plperl issues with perl_destruct() and END blocks