Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Need to sync tables between 2 Postgres 8.3 databases

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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
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.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

578 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