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: (view raw, whole thread or download thread mbox)
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


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-2017 The PostgreSQL Global Development Group