Re: Looking for way to replicate master db to multiple mobile databases

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Looking for way to replicate master db to multiple mobile databases
Date: 2009-09-24 11:04:31
Message-ID: 20090924110431.GC22438@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message stevesub 2009-09-24 12:14:40 Understanding 'could not read block'
Previous Message Mihail Nasedkin 2009-09-24 08:52:49 pg_toast record in table pg_class