Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

synchronize two pg databases

$
0
0

I have a postgresql server process each running in my desktop and the laptop.

Both servers have a database called MG with exactly same scheme/layout. Now I enter the data in to similar tables but at differing times.

I generally keep the primary keys separate so that they don't clash with each other. eg: oddnumber pkey for laptop and even number for desktop.

Now how do I synchronize the data between the desktop and laptop cleanly?

DESK:ADDRESS ----- LAP:ADDRESS
DESK:TO_DO   ----- LAP:TO_DO

DESK uses pkeys like 1001... for inserts
LAP uses pkeys like 2001... for inserts

I need both update for the modified records and insert for new records. But how?


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>