Re: intercepting WAL writes - Mailing list pgsql-hackers

From Mario Weilguni
Subject Re: intercepting WAL writes
Date
Msg-id 4845122A.1060705@sime.com
Whole thread Raw
In response to intercepting WAL writes  ("Mike" <mike@fonolo.com>)
List 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.


pgsql-hackers by date:

Previous
From: Zdenek Kotala
Date:
Subject: Re: Case-Insensitve Text Comparison
Next
From: Paul van den Bogaard
Date:
Subject: Re: Overhauling GUCS