Problem DataBase PostgreSQL Hight Availability Postgres HA Issues
This article is to summarize some problems and solutions in the context of PostgresSQL HA. In my setup, I’m using the database on a Kubernetes cluster.
Most likely you have a wrong PostgreSQL replication manager version. Change the version by changing the docker image.
Instead of version 11.13.0-debian-10-r0 use a version 11.12.0-debian-10-r0. And try if the problem consists. For an overview of the available version use https://hub.docker.com/r/bitnami/postgresql-repmgr/tags .
Waiting for primary node
Probably your host setting for the connection is wrong. Therefore we can use the environment variable “REPMGR_NODE_NETWORK_NAME”. The value typically should look something like this:
Should look something like this:
If you run into a problem of the following context.
The node name does not follow the required format.
Here is the solution:
The Enviroment Variable “REPMGR_NODE_NAME” is mission or set wrongly. Therefore we can set “pg-0” here. Mostly this is the correct name but double check if it is really our desired name.
if you are using RancherOS as your Kubernetes management system you can change the configuration and environment variables by switching to the cluster manager -> StatefulSets -> click on the “…-ha-postgresql” instance ->click on the three dots -> edit config. Here you can now edit the environment variables of a workload.