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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

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