pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PFC <lists@peufeu.com>
To: Jim C. Nasby <jnasby@pervasive.com>
To: C Storm <christian.storm@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: pgmemcache
Date: Wed, 12 Apr 2006 09:19:18 +0200
Message-ID: <op.s7vvyggtcigqcu@apollo13> (raw)
In-Reply-To: <20060411225515.GZ49405@pervasive.com>
References: <1144135482.063425.33380@z34g2000cwc.googlegroups.com>
	<20060411225515.GZ49405@pervasive.com>


	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 being used immediately, this data is kept in a buffer
	- Notify is issued

	On commit :
	- postgres sends the NOTIFY signal
	- the memcache updater reads the NOTIFY (which embeds the PID I believe)  
; it finds the buffered data sent above and uses it to update memcached

	On rollback :
	- Interesting problem ;)))

	OK, it's a kludge. When can we get ON COMMIT triggers ?




> 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.  Or perhaps any other
>> information regarding a successful
>> deployment of pgmemcache.
>
> The problem with attempting that is that you'd have a window between
> transaction commit and when the cache was invalidated. If that's
> acceptable then it shouldn't be too difficult to set something up using
> LISTEN/NOTIFY like you describe.





view thread (14+ messages)  latest in thread

Message-ID: <op.s7vvyggtcigqcu@apollo13>
Permalink:  ../op.s7vvyggtcigqcu@apollo13/
Also on:    postgresql.org/message-id/op.s7vvyggtcigqcu@apollo13

 · 

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: lists@peufeu.com, jnasby@pervasive.com, christian.storm@gmail.com
  Subject: Re: pgmemcache
  In-Reply-To: <op.s7vvyggtcigqcu@apollo13>

* 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