Re: triggers on prepare, commit, rollback... ?

From: Hannu Krosing <hannu(at)krosing(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Fabien COELHO <fabien(dot)coelho(at)ensmp(dot)fr>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: triggers on prepare, commit, rollback... ?
Date: 2008-05-20 07:58:00
Message-ID: 1211270280.8174.20.camel@huvostro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2008-05-19 at 21:53 -0400, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> >>> trigger on "prepare", "commit", "rollback", "savepoint",
> >>
> >> This is a sufficiently frequently asked question that I wish someone
> >> would add an entry to the FAQ about it, or add it to the TODO list's
> >> "Features we don't want" section.
>
> > OK, remind me why we don't want it again?
>
> I'm sure I've ranted on this several times before, but a quick archive
> search doesn't find anything. So, here are a few points to chew on:
>
> * Trigger on rollback: what's that supposed to do?

Tell others that this trx failed, maybe log a failure ?

OTOH, this can be implemented by a daemon that sits on
"tail -f logfile | grep ROLLBACK"

> The current
> transaction is already aborted, so the trigger has no hope of making any
> database changes that will ever be visible to anyone.

after reading your explanations trigger on rollback/failure is the only
one what makes sense still, but it may be that after failure it does not
have enough state usable to report anything useful.

-----------------
Hannu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Babu, Gabriel Suresh 2008-05-20 08:22:39 Installation of Postgres 32Bit on 64 bit machine
Previous Message cinu 2008-05-20 06:42:23 Re: Installation of Postgres 32Bit on 64 bit machine