我正在使用 repmgr 并已成功故障转移到备用节点。但是,当我尝试恢复失败的主节点时,我现在发现我有两个主节点。
我试图将备用节点重新注册为备用节点。但是我发现当repmgr检查节点的模式时,发现它处于恢复模式并且不允许它。
repmgr -f /var/lib/pgsql/repmgr/repmgr.conf cluster show
=> Role | Connection String
* master | host=<IP Address> user=repmgr dbname=my_db
* master | host=<IP Address> user=repmgr dbname=my_db
节点 1
repmgr -f /var/lib/pgsql/repmgr/repmgr.conf --verbose master register --force
=> Opening configuration file: /var/lib/pgsql/repmgr/repmgr.conf
repmgr connecting to master database
repmgr connected to master, checking its state
finding node list for cluster 'my_cluster'
checking role of cluster node 'host=<IP Address> user=repmgr dbname=my_db'
There is a master already in cluster my_cluster
Node 2
============
repmgr -f /var/lib/pgsql/repmgr/repmgr.conf standby clone -h <master Node IP> --force
=> repmgr: directory "." exists but is not empty
任何意见,将不胜感激。