From: | "Mike" <mike(at)fonolo(dot)com> |
---|---|
To: | "'Jonah H(dot) Harris'" <jonah(dot)harris(at)gmail(dot)com> |
Cc: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: intercepting WAL writes |
Date: | 2008-05-29 00:30:22 |
Message-ID: | 008801c8c123$2e3e2560$8aba7020$@com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, May 28, 2008 at 7:11 PM, Mike <mike(at)fonolo(dot)com> wrote:
>> Can somebody point to the most logical place in the code to intercept the
>> WAL writes? (just a rough direction would be enough)
>
>XLogInsert
>
Great- I'll take a look at that code.
>> 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).
>
>Without triggers, you don't have many options. With triggers, you
>could use pg_memcache. If you take it from the WAL, you'll have to do
>a bit of decoding to make it usable in the context you're looking for,
>which is quite a bit of work.
>
When you say a bit of decoding, is that because the data written to the logs
is after the query parser/planner? Or because it's written in several
chunks? Or?
I turned on WAL_DEBUG; it wasn't immediately helpful, tho I don't know what
it means quite yet. I guess perfectly formatted SQL statements would be too
easy ;)
Mike
From | Date | Subject | |
---|---|---|---|
Next Message | Darren Reed | 2008-05-29 00:32:34 | Catching exceptions from COPY |
Previous Message | Jeff Davis | 2008-05-29 00:25:24 | Re: intercepting WAL writes |