上级分类: Distributed data storage

Synchronize Postgresql databases

Imagine issuing a COPY TO query for every table in a database and then syncing the resulting CSV with other nodes. We can add a version column to every table so we avoid syncing unnecessarily. Conflict detection could be implemented by showing multiple copied and marking one as active.

YAML 问题

I am thinking of writing some program to synchronize Postgres databases. I would issue a COPY TO command on every table with a version greater than column check and then transfer it to other nodes and the same happens in reverse. CSV has parsers in many languages so it could be written in any language. Conflicts can be resolved by having a policy where the winning version is marked active.


没有子分类。


投票 (可选) (别通知) (可选)
请,登录
语言