Re: [PERFORM] pgmemcache

2006-04-17 Thread Christian Storm
I'll let you in on a secret: NOTIFY is actually a before-commit operation. This is good enough because it never, or hardly ever, fails. I would argue that anything you want to do in an AFTER COMMIT trigger could just as well be done in a BEFORE COMMIT trigger; if that's not reliable enough th

Re: [PERFORM] pgmemcache

2006-04-17 Thread Christian Storm
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

Re: [PERFORM] pgmemcache

2006-04-13 Thread Tom Lane
PFC <[EMAIL PROTECTED]> writes: > I guess AFTER COMMIT triggers would be like a NOTIFY, but more > powerful. I'll let you in on a secret: NOTIFY is actually a before-commit operation. This is good enough because it never, or hardly ever, fails. I would argue that anything you want to do

Re: [PERFORM] pgmemcache

2006-04-13 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Christian Storm <[EMAIL PROTECTED]> 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- > > comm

Re: [PERFORM] pgmemcache

2006-04-13 Thread PFC
An AFTER COMMIT trigger would have to be in a separate transaction. I guess AFTER COMMIT triggers would be like a NOTIFY, but more powerful. While NOTIFY can't transmit information to another process, this trigger could, and the other process could then view the results of the commited

Re: [PERFORM] pgmemcache

2006-04-13 Thread Jim Nasby
On Apr 13, 2006, at 12:38 PM, Tom Lane wrote: Christian Storm <[EMAIL PROTECTED]> 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' (roll

Re: [PERFORM] pgmemcache

2006-04-13 Thread Tom Lane
Christian Storm <[EMAIL PROTECTED]> 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 AFTE

Re: [PERFORM] pgmemcache

2006-04-13 Thread Markus Schaber
Hi, Tom, Tom Lane wrote: >>Why are AFTER COMMIT triggers impossible? > > What happens if such a trigger gets an error? You can't un-commit. Then it must be specified that those triggers are in their own transaction, and cannot abort the transaction. Or use the 2-phase-commit infrastructure fo

Re: [PERFORM] pgmemcache

2006-04-12 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > Why are AFTER COMMIT triggers impossible? What happens if such a trigger gets an error? You can't un-commit. regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9' the

Re: [PERFORM] pgmemcache

2006-04-12 Thread Jim C. Nasby
On Wed, Apr 12, 2006 at 04:03:43PM -0700, Josh Berkus wrote: > PFC, > > > It would be nice to have ON COMMIT triggers for this use. > > > > However you can emulate ON COMMIT triggers with a modification of the > > memcache update process : > > Well, I'm back in touch with the GORDA projec

Re: [PERFORM] pgmemcache

2006-04-12 Thread Josh Berkus
PFC, > It would be nice to have ON COMMIT triggers for this use. > > However you can emulate ON COMMIT triggers with a modification of the > memcache update process : Well, I'm back in touch with the GORDA project so possibly we can have BEFORE COMMIT triggers after all. BTW, it's i

Re: [PERFORM] pgmemcache

2006-04-12 Thread PFC
It would be nice to have ON COMMIT triggers for this use. However you can emulate ON COMMIT triggers with a modification of the memcache update process : - A standard trigger sends the data to update to memcache - The trigger also sends the PID - Instead of b

Re: [PERFORM] pgmemcache

2006-04-11 Thread Jim C. Nasby
On Tue, Apr 04, 2006 at 12:24:42AM -0700, C Storm wrote: > I was wondering if anyone on the list has a successful installation of > pgmemcache running > that uses LISTEN/NOTIFY to signal a successfully completed transaction, > i.e., to get around the fact > that TRIGGERS are transaction unaware. O

[PERFORM] pgmemcache

2006-04-10 Thread C Storm
I was wondering if anyone on the list has a successful installation of pgmemcache running that uses LISTEN/NOTIFY to signal a successfully completed transaction, i.e., to get around the fact that TRIGGERS are transaction unaware. Or perhaps any other information regarding a successful deployment o