Unable to attach with upstream node using node rejoin

2.9k Views Asked by At

Trying to join with my upstream node1 but unable to do it. Just showing a warning like WARNING: node "node2" not found in "pg_stat_replication" . Where is the issue? and how can I join with node1 it?

This is the replication slot status: enter image description here

Below is the node status: enter image description here

Below is the node rejoin error: enter image description here

Try using standby follow but showing below error enter image description here

2

There are 2 best solutions below

1
JoeZSZ On

I have had a similar issue with postgresql-13 and repmgr-13, so this bug is definitely not fixed.

All I could do is recreate the standby from scratch, which is really a pain in the ...

0
Vincent Gerris On

First a tip : paste text, not screenshots. There can be a few causes. In my case, one cause was the lack of a restore of the postgresql.conf after a repmgr/barman restore. Make sure that file is correct both on master and slave.

Another cause can be that your repmgr command looks in different spots. As far as I understand it, that data is also in a database and that also syncs between nodes. The error indicates that in the data known by repmgr, the second node is not registered. You can try to reregister it, but I think it has something to do with the above mentioned settings - lack of rights or syncing of the database.

To register run on the standby node:

repmgr standby register -F

If you cannot get it to work, the easiest way to get back to running properly is to clone, by running this on the standby node :

repmgr standby clone --force -h node1 -U repmgr -d repmgr

where node1 is your primary.