Re: Replication

From: Brian Bruns <camber(at)ais(dot)org>
To: Randall Jonasz <rjonasz(at)trueimpact(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Replication
Date: 2002-02-09 00:17:00
Message-ID: Pine.LNX.4.33.0202081904190.18420-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > I have in the back of my mind, an idea of patching into the WAL stuff, and
> > using that mechanism to push changes out to the slaves.
> >
> > Where one machine is still the master, but no trigger stuff, just a WAL patch.
> > Perhaps some shared memory paradigm to manage WAL visibility? I'm not sure
> > exactly, the idea hasn't completely formed yet.
> >

FWIW, Sybase Replication Server does just such a thing.

They have a secondary log marker (prevents the log from truncating past
the oldest unreplicated transaction). A thread within the system called
the "rep agent" (but it use to be a separate process call the LTM), reads
the log and forwards it to the rep server, once the rep server has the
whole transaction and it is written to a stable device (aka synced to
disk) the rep server responds to the LTM telling him it's OK to move the
log marker forward.

Anyway, once the replication server proper has the transaction it uses a
publish/subscribe methodology to see who wants get the update.

Bidirectional replication is done by making two oneway replications. The
whole thing is table based, it marks the tables as replicated or not in
the database to save the trip to the repserver on un replicated tables.

Plus you can take parts of a database (replicate all rows where the
country is "us" to this server and all the rows with "uk" to that server).
Or opposite you can roll up smaller regional databases to bigger ones,
it's very flexible.

Cheers,

Brian

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew McMillan 2002-02-09 01:10:23 Re: Database abstration layers
Previous Message Tom Lane 2002-02-08 23:43:25 Re: Summary of new configuration file and data directory locations