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.
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.
I want to take one set of data and synchronize it with another set where there could be changed to columns, new rows and deleted rows