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.


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


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


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.

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .