Solved

Need to sync tables between 2 Postgres 8.3 databases

Posted on 2011-02-18
3
1,859 Views
Last Modified: 2012-05-11
I am running a Postgres 8.3 database server with 2 different databases.  One of the databases has production data and the other is development data.  I was to be able to sync data from dev to prod on selected tables, not the entire database.  How can I do that?
0
Comment
Question by:WH_Tech
3 Comments
 
LVL 12

Accepted Solution

by:
mcv22 earned 167 total points
ID: 34930285
There are different ways to do it. See http://www.postgresql.org/docs/8.3/static/backup.html
0
 
LVL 22

Assisted Solution

by:earth man2
earth man2 earned 166 total points
ID: 34933119
slony is a good fit to do this specific job.

http://www.slony.info/documentation/2.0/administration.html#AEN618
0
 
LVL 12

Assisted Solution

by:OnegaZhang
OnegaZhang earned 167 total points
ID: 36199906
method 1:
add a timestamp field to your table, a delete flag field. Always update the timestamp field when you update a row. Then you can synchronize by checking timestamp field.

method 2:
Create triggers to monitor data change, and write change operation in another table. Synchronize two similar tables: recursive triggers
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Best database to use for Maps is PostgreSQL. This is an open source database. Comes as a package with most Linux OS. For more info visit the following site: http://www.postgresql.org/ (http://www.postgresql.org/) This requires some add-o…
Many developers have database experience, but are new to PostgreSQL. It has some truly inspiring capabilities. I have several years' experience with Microsoft's SQL Server. When I began working with MySQL, I wanted a quick-reference to MySQL (htt…
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now