Re: About the structure of WAL Files.

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Charlie Wang <wangbaobing(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>
Subject: Re: About the structure of WAL Files.
Date: 2006-03-15 13:52:30
Message-ID: 20060315135230.GI5222@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Simon Riggs wrote:
> On Wed, 2006-03-15 at 09:12 -0400, Alvaro Herrera wrote:
> > Charlie Wang wrote:
> > > I want to write a function to expose the content of WAL Files as streams,
> > > and then send to somewhere else, record by record.
> >
> > Re: the WAL records, most likely they are useless outside the server
> > that generated them, because they refer to relations using Oids, and to
> > specific page addresses which are probably not going to be exactly the
> > same anywhere else (consider VACUUM commands running at different
> > times).
>
> Yet it should be pointed out that there is a commercial product that
> says it uses this information to provide a replication system for
> PostgreSQL, so presumably that problem can be solved...

Are you referring to Mammoth Replicator? Let me point out that it
doesn't really use the WAL.

Now that I think of it, maybe the problem _can_ be solved. Consider
e.g. the WAL-dispatcher resolving the relation Oids to relnames before
shipping, and the WAL-receiver resolving that back to a local Oid before
"applying". And it only needs to get the tuple contents; it can ignore
the position, and it can resolve the indexing by itself.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2006-03-15 14:05:17 Re: [PATCHES] About the structure of WAL Files.
Previous Message Simon Riggs 2006-03-15 13:43:36 Re: [PATCHES] About the structure of WAL Files.

Browse pgsql-patches by date

  From Date Subject
Next Message Jonah H. Harris 2006-03-15 14:05:17 Re: [PATCHES] About the structure of WAL Files.
Previous Message Simon Riggs 2006-03-15 13:43:36 Re: [PATCHES] About the structure of WAL Files.