Logical Cluster Schema Management
I think it would be good to look into cluster schema management. Basically, the issue is, if we have logical replication between two servers (currently only PgSQL is supported) then we write to the master, but can do reads from wherever. The issue with these sorts of master-slave replication systems is that DDL changes are not replicated. So in the schema manager, I think it would be cool to be able to write the updates to all known hosts in the cluster.
This will require a couple of things:
- Figuring out all the hosts in the cluster. Currently this is setup in the config where you setup the DBI connection as normal, but can specify a "master" connection that will be used for writes. it would be cool to look into making this automated. I know that it previously did not work, but I should look into it again with the latest versions.
- Once a list of hosts is available, we should run the schema migration on each one. This could allow slaves at different versions to be brought up to date so should be done as a whole, not for each individual replay command.
NOTE: This is a feature required for LOGICAL replication ONLY. Standard streaming replication will replicate DDL commands so this is not required.
Edited by Jamie Carl