Re: pgmemcache - Mailing list pgsql-performance

From Christian Storm
Subject Re: pgmemcache
Date
Msg-id 4D23826E-7325-4946-B79A-80E321E0E497@gmail.com
Whole thread Raw
In response to Re: pgmemcache  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
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


pgsql-performance by date:

Previous
From: Cris Carampa
Date:
Subject: index is not used if I include a function that returns current time in my query
Next
From: Christian Storm
Date:
Subject: Re: pgmemcache