Re: intercepting WAL writes - Mailing list pgsql-hackers

From Decibel!
Subject Re: intercepting WAL writes
Date
Msg-id 50D3DDD3-A96C-46D6-BDB2-ED23FCE27CCD@decibel.org
Whole thread Raw
In response to Re: intercepting WAL writes  (Hannu Krosing <hannu@krosing.net>)
List pgsql-hackers
On May 29, 2008, at 1:57 AM, Hannu Krosing wrote:
> On Wed, 2008-05-28 at 19:11 -0400, Mike wrote:
>
>>
>> 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 don't think that intercepting (and then decoding ) WAL is very
> productive. It is too low level to be of much help.
>
> The way I'd do it would be using pgQ from SkyTools package where
> change
> events can be queued when happening and then moved in bulk to
> memcached
> with not too much effort.


Actually, you might look one step further and see about adding
memcached as a subscriber type to londiste; it might be easier than
just using PgQ... not that using PgQ would be all that hard.

Also, keep in mind that no matter what you do you'll always have a
race condition between data in the database and in memcached.
--
Decibel!, aka Jim C. Nasby, Database Architect  decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828



pgsql-hackers by date:

Previous
From: "Heikki Linnakangas"
Date:
Subject: Re: cannot use result of (insert..returning)
Next
From: Decibel!
Date:
Subject: Re: DISTINCT -> GROUP BY