The commands listed in this document use BOSH CLI v2+.
The current Crunchy PostgreSQL for PCF tile release included high availability features that in the event of a problem on the Primary PostgreSQL server, our configuration would automatically fence the Primary and promote a replica to Primary status. Our recent release of the v04.090513.001
tile version included some additional statistics gathering as part of our health check process.
The high availability functions are based on the status of each server in Consul. On each of the PostgreSQL servers, there exists a script at /var/vcap/store/service/healthcheck.sh
. Every service has one, haproxy, pgbackrest, postgresql, etc. in the same location. The Consul application on each VM runs that script, if it exits with a status code of 0, it is in passing
state, if it is 1 warning
state and anything 2 or above it is marked critical
. Our HA configuration is such that if the status of a PostgreSQ