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

Re: Transaction callback

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Thomas Hallgren" <thhal(at)mailblocks(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Transaction callback
Date: 2004-01-31 17:53:56
Message-ID: 5365.1075571636@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
"Thomas Hallgren" <thhal(at)mailblocks(dot)com> writes:
> Ideally, I'd like a "beforeCompletion" that is executed prior to the start
> of the commit process and a "afterCompletion" that is called when the
> transaction is commited. The latter would have a status flag indicating if
> status is "prepared" (to support 2-phase commits), "commited", or "rolled
> back".

And what exactly would this callback do?

The transaction commit sequence is sufficiently delicate that I'm not
interested in any proposals to call random user-written code in it.
The notion of a post-commit callback is even more problematic --- what
is it going to do at all?  It cannot modify the database, and it cannot 
do anything that risks getting an error, which seems to leave mighty
little scope for useful activity.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2004-01-31 18:15:57
Subject: Kerberos as source of user name? (Re: segfault in psql on x86_64)
Previous:From: Tom LaneDate: 2004-01-31 17:11:03
Subject: Re: dump + restore didn't include schemas

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