Problem DataBase PostgreSQL Hight Availability Postgres HA Issues

2 min readApr 26, 2022


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.

1. Problem:

Stopping PostgreSQL…


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 .

2. Problem:

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:

3. Problem:

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.

Helpful articles:







Contact me, If you like my work or have any questions.

Recommended from Medium


See more recommendations