上級分類: 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.


沒有子分類。

投票 (可選) (別通知) (可選)
請,登錄
語言