Skip site navigation (1) Skip section navigation (2)

Re: Database syncronization

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: shadow(at)s3os(dot)net, pgsql-admin(at)postgresql(dot)org
Subject: Re: Database syncronization
Date: 2005-04-20 17:00:57
Message-ID: 200504201000.57192.scrawford@pinpointresearch.com (view raw or flat)
Thread:
Lists: pgsql-admin
On Wednesday 20 April 2005 9:44 am, Shadow wrote:
> Hy all !
>
> Is there any tool, middelware, or feature to syncronize 2 databases
> (With the same schema, ofcourse)
>
> I have an application that runs from 2 points. One of this points
> has a master database and the other point neds to sync its data
> daily from the master.

There are several options depending on your needs.

If you just need a second machine updated daily then just do a 
pg_dumpall from the master and restore it on the second machine (all 
automated from cron).

Alternately, in 8.x you can copy the master's files to the second 
machine and then just use the WAL files to keep the second machine 
up-to-date. If you like this option check the backup section of the 
documentation, especially section 22.3, to read about on-line backup 
and recovery.

For near real-time replication you can use a replication solution like 
slony-i.

All of the above assume that all modifications to the database are 
done to the master and simply duplicated one way or another to a 
slave.

There are also projects that act as connection-pooling and 
load-balancing solutions that write all changes to multiple 
databases. I believe dbbalancer is one but it is listed as "Alpha" 
and the last update was in 2002.

Cheers,
Steve

In response to

pgsql-admin by date

Next:From: John DeSoiDate: 2005-04-20 17:08:57
Subject: Re: Database syncronization
Previous:From: ShadowDate: 2005-04-20 16:44:26
Subject: Database syncronization

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group