[clug] Disconnected multi-master DB?

Arjen Lentz arjen at lentz.com.au
Tue Nov 4 23:10:11 GMT 2008

Hi Chris

On 05/11/2008, at 7:52 AM, Chris Smart wrote:
> Anyone have experience setting up asynchronous multi-master  
> PostgreSQL (or
> MySQL) servers, that are disconnected 99.99% of the time? (Connected  
> only
> for purposes of synchronisation.)
> At work we have two completely separate networks with PostgreSQL  
> that must
> (at some stage) hold the same records, all the while being available  
> to take
> new data separately.
> I.e.
> Server 1 takes in some records while at the same time server 2 takes  
> in some
> other records.
> Sync the data so that both servers hold the same records (without  
> conflicts)
> while not using uniquely identifiable primary keys.

Can you clarify the last requirement on the primary keys?

With MySQL, there's a number of ways you can do this.

You can set up the servers so that they produce (without talking to  
eachother) non-conflicting sequence (auto-increment IDs).
If they never touch eachother's rows with updates/deletes either, you  
could periodically start regular mysql replication from both ends, and  
that would work fine.

Alternatively you could just never use MySQL's internal replication at  
all but merely use the table synchronisation tool from Maatkit  
(maatkit.org) for the syncing. Looks sufficient for your purpose.

Arjen Lentz, Director @ Open Query (http://openquery.com.au)
Training and Expertise for MySQL in Australia and New Zealand

OurDelta: free enhanced builds for MySQL @ http://ourdelta.org

More information about the linux mailing list