Skip site navigation (1) Skip section navigation (2)

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

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5066: plperl issues with perl_destruct() and END blocks
Date: 2009-09-21 16:06:30
Message-ID: 20090921160630.GF29793@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-bugs
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?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2009-09-21 16:31:31
Subject: Re: BUG #5053: domain constraints still leak
Previous:From: David FetterDate: 2009-09-21 15:51:10
Subject: Re: BUG #5066: plperl issues with perl_destruct() and ENDblocks

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group