OK, I’ve done some reading and testing about PostgreSQL and streaming replications, hot-standby,…
I’ve successfully setup two VM’s with Postgres on each and setup master and slave. Syncing between them works and when the master goes down, I can promote the slave to master with trigger file.
On third VM I have Ignition gateway.
But, I still fail to understand, how to tell Ignition to use second Postgres (which is now master), when master Postgres fails?
I have master Postgres with IP: 192.168.123.210 and slave Postgres with IP: 192.168.123.211.
In Ignition database connection setting you specify Connect URL as:
When master Postgres fails and slave is promoted to master, the IP for Postgres server is different:
Of course, I’m looking for an automated way for Ignition to switch between master and slave databases.
But maybe I’m wrong… and all this must be done manually…