Re: Looking for way to replicate master db to multiple mobile databases - Mailing list pgsql-general

From Sam Mason
Subject Re: Looking for way to replicate master db to multiple mobile databases
Date
Msg-id 20090924110431.GC22438@samason.me.uk
Whole thread Raw
In response to Re: Looking for way to replicate master db to multiple mobile databases  (Bryan Montgomery <monty@english.net>)
List pgsql-general
On Wed, Sep 23, 2009 at 06:00:03PM -0400, Bryan Montgomery wrote:
> Thanks for the reply. This is a one way push to the slaves. In theory, there
> shouldn't be any conflicts .... although I wouldn't swear to that. If
> there's a conflict, the master db should win. At the moment we just drop the
> tables, recreate the schema and reload the tables. However, some of the
> large tables literally take hours across the network, for maybe a few dozen
> changes.

Could you just replay WAL updates?  I.e. have two copies of the database
on each device, one as the mirror of the "master" and one as the "live"
version.  When you need to push the changes out, just push out the WAL
updates, dump the "live" version, copy the "master" into a new "live"
version and then replay the new WAL records.

Depends on how much disk space you have I guess.

--
  Sam  http://samason.me.uk/

pgsql-general by date:

Previous
From: Bryan Montgomery
Date:
Subject: Re: Looking for way to replicate master db to multiple mobile databases
Next
From: Alexey Klyukin
Date:
Subject: Re: Looking for way to replicate master db to multiple mobile databases