Re: intercepting WAL writes

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Mike <mike(at)fonolo(dot)com>
Cc: "'Jonah H(dot) Harris'" <jonah(dot)harris(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: intercepting WAL writes
Date: 2008-05-29 20:01:40
Message-ID: 1212091300.3957.9.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Wed, 2008-05-28 at 21:47 -0400, Mike wrote:
> On Wed, May 28, 2008 at 8:30 PM, Mike <mike(at)fonolo(dot)com> wrote:
> >> 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?
> >
> >Because that's the actual recovery record. There is no SQL text, just
> >the WAL record type (XLOG_HEAP_INSERT, XLOG_HEAP_UPDATE,
> >XLOG_XACT_COMMIT, ...) and the data as it relates to that operation.
>
> Oh- right- that makes sense.

Hmm, yes and no.

WAL doesn't carry enough information to reconstruct updates or deletes
external to the database in question. That's the barrier you need to
cross, not just piping the results somewhere.

I envision being able to do this in the future and exposing an API to
allow it to happen, but we aren't there yet.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Kreen 2008-05-29 20:05:09 replication hooks
Previous Message Greg Sabino Mullane 2008-05-29 20:01:06 Initial max_connections for initdb on FreeBSD.