Re: Syncing Data to Production DB Server - Mailing list pgsql-general

From Ben Chobot
Subject Re: Syncing Data to Production DB Server
Date
Msg-id 54803F8E-2218-4F4C-9694-E5A0D6178747@silentmedia.com
Whole thread Raw
In response to Syncing Data to Production DB Server  (Adarsh Sharma <adarsh.sharma@orkash.com>)
Responses Re: Syncing Data to Production DB Server
List pgsql-general
On Aug 18, 2011, at 5:36 AM, Adarsh Sharma wrote:

> Dear All,
>
> I want some views on the below requirements :
>
> 1. I have a Postgres DB server with 25 GB database. It has more than 110 tables.
>   I am using Postgresql 8.3 on a CentOs.
> 2. I have another system laptop that contains the same database but it is for testing purposes.
>
> What I want ? If someone inserts some data in the laptop ( same database and tables as Postgres DB server ) , that
datawould synk to my Production Database server. 
>
> I thought the replication would help but it is not necessary that the laptop is connected to LAN always and if by
mistakeissue drop command, all goes in vain . 
>
> PLease guide me some ways or solutions .

So.... to rephrase (and simplify):

- you have a main database
- you have another database which is a superset of the main database
- you want both databases to be able to accept inserts, deletes, etc.
- you want to replicate inserts (only?) on the overlapping tables of the second database back to the main database (or
doyou want bi-directional replication?) 
- these databases will often not be able to talk to each other


It sounds like Buccardo *might* be a solution for you. It allows for multi-master operation, which is what you seem to
belooking for. 

But if you want, say, inserts only to be replicated, and not deletes, you probably need to look into writing your own
replicationsystem in your application. If you keep the requirements strict enough it's really not that hard.  

pgsql-general by date:

Previous
From: John Cheng
Date:
Subject: Re: call initdb as regular user
Next
From: alexondi
Date:
Subject: Re: call initdb as regular user