简体   繁体   中英

Postgres Asynchronous replication

i have an RoR application working with a Postgres database. This is working in a local computer for local network clients. But i want to add a database on the cloud mirroring the local database. But there is a problem, sometimes here the internet goes down, so the local service can continue working but the database on the cloud would be waiting from the next time the local database connect to internet to sync the changes.

I have been reading about synchronous replication but i dont think it would work in this case. So async replication could help but which choose (slony, buscardo, pglogical)?

Can i accomplish this?

UPDATE

If i use async replication with slony or bucardo, will they keep trying to send the changes to the cloud database when internet is not available or will they send the changes and fail and no try anymore (In this case the cloud database will have incorrect data since that event)?

Ummh, I am afraid sync replication is not an option here. Even your local and your cloud are up an running, sync replication will slow down your local database due to your network latency. Only choice is async replication and you have to wait for your cloud database to catch up your local db in case of internet connection is disconnected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM