Re: 2-phase commit

Hans-Jürgen Schönig <hs@cybertec.at>

From: Hans-Jürgen Schönig <hs@cybertec.at>
To: "Marc G. Fournier" <scrappy@postgresql.org>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>, Richard Huxton <dev@archonet.com>, Tom Lane <tgl@sss.pgh.pa.us>, Christopher Kings-Lynne <chriskl@familyhealth.com.au>, Zeugswetter Andreas SB SD <ZeugswetterA@spardat.at>, Andrew Sullivan <andrew@libertyrms.info>, pgsql-hackers@postgresql.org
Date: 2003-10-05T09:21:03Z
Lists: pgsql-hackers
Marc G. Fournier wrote:
> 
> On Sat, 27 Sep 2003, Bruce Momjian wrote:
> 
> 
>>I have been thinking it might be time to start allowing external
>>programs to be called when certain events occur that require
>>administrative attention --- this would be a good case for that.
>>Administrators could configure shell scripts to be run when the network
>>connection fails or servers drop off the network, alerting them to the
>>problem.  Throwing things into the server logs isn't _active_ enough.
> 
> 
> Actually, apparently you can do this now ... there is apparently a "mail
> module" for PostgreSQL that you can use to have the database send email's
> out ...
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 


I guess someting such as

CREATE TRIGGER my_trig ON BEGIN / COMMIT
	EXECUTE ...


would be nice. I think this can be used for many perposes (not 
necessarily 2PC).
If a trigger could handle database events and not just events on tables.

ON BEGIN
ON COMMIT
ON CREATE TABLE , ...

We could have used that so often in the past in countless applications.

	Regards,

		Hans


-- 
Cybertec Geschwinde u Schoenig
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/2952/30706 or +43/660/816 40 77
www.cybertec.at, www.postgresql.at, kernel.cybertec.at