pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Christian Storm <christian.storm@gmail.com>
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: 13 Apr 2006 16:52:37 -0400
Message-ID: <87irpdgpuy.fsf@stark.xeocode.com> (raw)
In-Reply-To: <26792.1144949880@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>
	<4D23826E-7325-4946-B79A-80E321E0E497@gmail.com>
	<26792.1144949880@sss.pgh.pa.us>

Tom Lane <tgl@sss.pgh.pa.us> writes:

> Christian Storm <christian.storm@gmail.com> writes:
> > 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.
> 
> An AFTER COMMIT trigger would have to be in a separate transaction.
> What happens if there's more than one, and one of them fails?  Even
> more to the point, if it's a separate transaction, don't you have
> to fire all these triggers again when you commit that transaction?
> The idea seems circular.

Maybe it just means they would have to be limited to not making any database
modifications. Ie, all they can do is notify the outside world that the
transaction committed. 

Presumably if you wanted to make any database modifications you would just do
it in the transaction anyways since they wouldn't show up until the
transaction commits.

-- 
greg




view thread (14+ messages)  latest in thread

Message-ID: <87irpdgpuy.fsf@stark.xeocode.com>
Permalink:  ../87irpdgpuy.fsf@stark.xeocode.com/
Also on:    postgresql.org/message-id/87irpdgpuy.fsf@stark.xeocode.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: gsstark@mit.edu, tgl@sss.pgh.pa.us, christian.storm@gmail.com, jnasby@pervasive.com, josh@agliodbs.com, lists@peufeu.com
  Subject: Re: pgmemcache
  In-Reply-To: <87irpdgpuy.fsf@stark.xeocode.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