pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christian Storm <christian.storm@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jim C. Nasby <jnasby@pervasive.com>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org, PFC <lists@peufeu.com>
Subject: Re: pgmemcache
Date: Thu, 13 Apr 2006 10:29:28 -0700
Message-ID: <4D23826E-7325-4946-B79A-80E321E0E497@gmail.com> (raw)
In-Reply-To: <6236.1144888514@sss.pgh.pa.us>
References: <1144135482.063425.33380@z34g2000cwc.googlegroups.com>
	<20060411225515.GZ49405@pervasive.com>
	<op.s7vvyggtcigqcu@apollo13>
	<200604121603.43986.josh@agliodbs.com>
	<20060413001024.GP49405@pervasive.com>
	<6236.1144888514@sss.pgh.pa.us>

Not sure if I follow why this is a problem.  Seems like it would be  
beneficial to have both BEFORE and AFTER COMMIT triggers.
With the BEFORE COMMIT trigger you would have the ability to 'un- 
commit' (rollback) the transaction.  With
the AFTER COMMIT trigger you wouldn't have that option because the  
commit has already been successful.  However,
with an AFTER COMMIT you would be able to trigger other downstream  
events that rely on a transaction successfully committing.
If the trigger fails it is the triggers  problem, it isn't the  
commit's problem, i.e., you wouldn't want to 'un-commit'.  If the  
trigger
gets an error it has to gracefully deal with that error programatically.

Where have I gone astray with this logic?

On Apr 12, 2006, at 5:35 PM, Tom Lane wrote:

> "Jim C. Nasby" <jnasby@pervasive.com> writes:
>> Why are AFTER COMMIT triggers impossible?
>
> What happens if such a trigger gets an error?  You can't un-commit.
>
> 			regards, tom lane




view thread (14+ messages)  latest in thread

Message-ID: <4D23826E-7325-4946-B79A-80E321E0E497@gmail.com>
Permalink:  ../4D23826E-7325-4946-B79A-80E321E0E497@gmail.com/
Also on:    postgresql.org/message-id/4D23826E-7325-4946-B79A-80E321E0E497@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: christian.storm@gmail.com, tgl@sss.pgh.pa.us, jnasby@pervasive.com, josh@agliodbs.com, lists@peufeu.com
  Subject: Re: pgmemcache
  In-Reply-To: <4D23826E-7325-4946-B79A-80E321E0E497@gmail.com>
  References: <1144135482.063425.33380@z34g2000cwc.googlegroups.com> <20060411225515.GZ49405@pervasive.com> <op.s7vvyggtcigqcu@apollo13> <200604121603.43986.josh@agliodbs.com> <20060413001024.GP49405@pervasive.com> <6236.1144888514@sss.pgh.pa.us> <4D23826E-7325-4946-B79A-80E321E0E497@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox