Skip site navigation (1) Skip section navigation (2)

Re: intercepting WAL writes

From: Mario Weilguni <mweilguni(at)sime(dot)com>
To: Mike <mike(at)fonolo(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: intercepting WAL writes
Date: 2008-06-03 09:43:06
Message-ID: 4845122A.1060705@sime.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Mike schrieb:
>
> Hello,
>
> I’m new to the core PostgreSQL code, so pardon the question if the 
> answer is really obvious, and I’m just missing it, but I’ve got a 
> relatively large web application that uses PostgreSQL as a back-end 
> database, and we’re heavily using memcached to cache frequently 
> accessed data.
>
> I’m looking at modifying PostgreSQL (in some way) to push changes 
> directly to our memcache servers, in hopes of moving towards a system 
> where only writes are actually sent to the databases, and reads are 
> exclusively sent to the memcache servers.
>
> I’m guessing that I could intercept the WAL writes, and use this 
> information to push out to my memcache servers, similar to a 
> replication model.
>
> Can somebody point to the most logical place in the code to intercept 
> the WAL writes? (just a rough direction would be enough)- or if this 
> doesn’t make sense at all, another suggestion on where to get the 
> data? (I’m trying to avoid doing it using triggers).
>
> Thanks,
>
> Mike
>
Why not use rules? They are far more easy to use than patching at C 
Level, and you can simply write some functions at C level and load those 
as a postgres extension, and interact with MemCache at this level.

In response to

pgsql-hackers by date

Next:From: Paul van den BogaardDate: 2008-06-03 12:19:38
Subject: Re: Overhauling GUCS
Previous:From: Zdenek KotalaDate: 2008-06-03 09:27:29
Subject: Re: Case-Insensitve Text Comparison

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group