Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am having a postgres database on my portable and on a server. I would like to keep those two in sync as easy as possible. I know about slony but I am not able to figure out:

Does it work when the two servers are not always connected? - I may do changes on the db on my portable when it is not able to reach the other server.

Does it work both ways? Can I update the slave and get the updateds pushed to the master?

Does it sync changes in the db-structure? The database in question is a geographical database, and occasionally I import a new map as a new table, I am also often adding new view for data processing.

If slony is not useable in my case, are there any other usable tools? I've looked at dblink, but that does neither seem to be what I need.

share|improve this question

migrated from stackoverflow.com Jun 3 '12 at 23:15

This question came from our site for professional and enthusiast programmers.

3 Answers 3

What I know - Slony is Master/Slave replication solution with limited possibility copy structure's changes from master to slave. So this is not usable for your purposes. Probably dblink is not for you too - it is able to execute foreign SQL statement - nothing more.

you probably search tools like this or this

share|improve this answer

Depending on the volume of data changes to sync you can check this out as well DB Solo.

share|improve this answer

Bucardo might work, but keep in mind multi-master replication is inherently sketchy. You have conflict resolution and that's not a problem which has a one-size-fits-all solution.

If it were me I would build two apps, and synchronize data between them using LISTEN, NOTIFY, and custom scripts. That is a fair bit of work though.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.