| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Thomas Hallgren <thhal(at)mailblocks(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Transaction callback |
| Date: | 2004-01-31 19:08:01 |
| Message-ID: | 200401311908.i0VJ81k17723@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Tom Lane wrote:
> "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.
Why can't we call the callback before we commit so it can modify the
database?
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Helgason | 2004-01-31 19:23:43 | Re: Transaction callback |
| Previous Message | Tom Lane | 2004-01-31 18:15:57 | Kerberos as source of user name? (Re: segfault in psql on x86_64) |