[clug] Postgres sync / duplication

Robert Edwards bob at dcsmail.anu.edu.au
Sun May 7 03:33:27 GMT 2006

This is such an artificially restricted situation, that it is hard to
imagine how it would
apply in real life, but, given the scenario, you could run a job when
the user logs out
 - inspects the logs on each PostgreSQL server looking for inserts,
updates and deletes
 - determines in which direction the syncs need to take place
(checkpoint each log)
 - apply the equivalent inserts, updates and deletes to the other server

In theory, if both started in sync, then both should remain in sync.
Dunno what to do
if something goes wrong, though.

Just my quick thoughts on the issue.

Bob Edwards.

Michael Carden wrote:

>Imagine this scenario:
>Two servers. One Win2k with NTFS, one Red Hat Enterprise 3 with ext3. Each 
>runs a Postgres server containing content identical to the other. Each has 
>exactly one client workstation connected to it and no connection to anywhere 
>else. Each has one metric buttload (and growing) of RAID attached to it.
>Imagine this situation:
>One and only one user needs to do some stuff with one of the databases. User 
>logs into a workstation on either the Win or the Lin system and does work. 
>User finishes.
>Now, we need to synch the contents of the database that the user just fiddled 
>with, across to the database on the other system. Nobody else is doing 
>anything with either system once the user has finished, so stopping stuff and 
>restarting is not a problem. The user may have chosen to work on the Win or 
>the Lin database and it should make no difference which. The systems are not 
>normally linked (separate Ethernet networks and separate fibrechannel to 
>storage), but they could be for the duration of the 'synch.'
>If the Win system went down for a month for some reason and work continued on 
>the Lin system, it should be possible to synch again when the Win system is 
>available again. And same if the Lin system goes down.
>Any suggestions as to how this might be done?

More information about the linux mailing list