X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id 51C3911F6613 for ; Thu, 13 Apr 2006 14:38:10 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.388 X-Spam-Level: X-Spam-Status: No, score=-2.388 required=5 tests=[AWL=0.213, BAYES_00=-2.599, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id XOoGpxICiYAo for ; Thu, 13 Apr 2006 14:38:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 6D4C011F6605 for ; Thu, 13 Apr 2006 14:38:06 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k3DHc0FZ026793; Thu, 13 Apr 2006 13:38:00 -0400 (EDT) To: Christian Storm cc: "Jim C. Nasby" , Josh Berkus , pgsql-performance@postgresql.org, PFC Subject: Re: pgmemcache In-reply-to: <4D23826E-7325-4946-B79A-80E321E0E497@gmail.com> References: <1144135482.063425.33380@z34g2000cwc.googlegroups.com> <20060411225515.GZ49405@pervasive.com> <200604121603.43986.josh@agliodbs.com> <20060413001024.GP49405@pervasive.com> <6236.1144888514@sss.pgh.pa.us> <4D23826E-7325-4946-B79A-80E321E0E497@gmail.com> Comments: In-reply-to Christian Storm message dated "Thu, 13 Apr 2006 10:29:28 -0700" Date: Thu, 13 Apr 2006 13:38:00 -0400 Message-ID: <26792.1144949880@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200604/307 X-Sequence-Number: 18391 Christian Storm 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. regards, tom lane