Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Need to sync tables between 2 Postgres 8.3 databases

Posted on 2011-02-18
3
Medium Priority
?
2,130 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 668 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 664 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 668 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

971 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