Re: Asychronous database replication

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Chris Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Asychronous database replication
Date: 2005-09-16 01:54:45
Message-ID: 87slw5lqu2.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Chris Browne <cbbrowne(at)acm(dot)org> writes:

> Well, what you clearly want/need is asynchronous multimaster...

I didn't catch anything in his description that answered whether he needs
multimaster or a simple single master with many slaves model would suffice.

> I'm involved with Slony-I, which is asynchronous but definitely,
> consciously, intentionally NOT multimaster.
>
> It seems to me that you might be able to usefully cannibalize
> components from Slony-I; the trigger functions that it uses to
> intercept updates seem likely to be useful. Some of the data
> structures would be useful, notably "sl_log_1", which is where the
> updates are collected.

A general purpose replication system is a lot trickier and more technical that
building an application-specific system. While all of the above is cool, if
you're able to design the application around certain design constraints you
can probably build something much simpler.

My first reaction to this description was to consider some sort of model where
the master database publishes text dumps of the master database which are
regularly downloaded and loaded on the slaves. The slaves treat those tables
as purely read-only reference tables.

If you need data to propagate from the clients back to the server then things
get more complicated. Even then you could side step a lot of headaches if you
can structure the application in specific ways, such as guaranteeing that the
clients can only insert, never update records.

--
greg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2005-09-16 02:11:32 Re: Create a pg table from CSV with header rows
Previous Message ngoncalves81@cantv.net 2005-09-16 00:43:51 ERROR from backend during send_query: 'ERROR: cursor "sql_cur0140cc48" does not exist'