Postgresql 自动故障切换在repmgr中不起作用

Postgresql 自动故障切换在repmgr中不起作用,postgresql,ubuntu,repmgr,Postgresql,Ubuntu,Repmgr,我已经成功地设置了两个节点Master和Satndby。 我的版本是repmgr 2.0 PostgreSQL 9.3.6 备用repmgr.conf 主备用repmgr.conf 当我停止备用节点Postgressql服务时,我得到了以下repmgrd日志文件: [WARNING] repmgrd: Connection to standby has been lost, trying to recover... 20 seconds before failover decision [201

我已经成功地设置了两个节点Master和Satndby。 我的版本是repmgr 2.0 PostgreSQL 9.3.6

备用repmgr.conf

主备用repmgr.conf

当我停止备用节点Postgressql服务时,我得到了以下repmgrd日志文件:

[WARNING] repmgrd: Connection to standby has been lost, trying to recover... 20 seconds before failover decision
[2015-04-02 20:47:43] [WARNING] repmgrd: Connection to standby has been lost, trying to recover... 10 seconds before failover decision
[2015-04-02 20:47:53] [ERROR] repmgrd: We couldn't reconnect for long enough, exiting...
[2015-04-02 20:47:53] [ERROR] Failed to connect to local node, exiting! 

不执行脚本…请帮助我…

为了执行脚本,您需要停止主节点而不是备用节点,因为只有在主节点停机时才会发生故障切换

另外,在postgresql配置文件/etc/postgresql/9.3/main/postgresql.conf中添加共享的预加载库='repmgr_funcs'

并在/etc/repmgr/repmgr.conf文件中添加以下行:

promote_command='repmgr standby promote -f /etc/repmgr/repmgr.conf'
follow_command='repmgr standby follow -f /etc/repmgr/repmgr.conf'
为了更加确定,请通过执行ps aux | grep-i rep检查repmgrd是否实际运行

希望有帮助,
致以最诚挚的问候

我是否需要在postgressql.conf文件中包含共享的_preload_库='repmgr_funcs',以实现自动故障切换。
[WARNING] repmgrd: Connection to standby has been lost, trying to recover... 20 seconds before failover decision
[2015-04-02 20:47:43] [WARNING] repmgrd: Connection to standby has been lost, trying to recover... 10 seconds before failover decision
[2015-04-02 20:47:53] [ERROR] repmgrd: We couldn't reconnect for long enough, exiting...
[2015-04-02 20:47:53] [ERROR] Failed to connect to local node, exiting! 
promote_command='repmgr standby promote -f /etc/repmgr/repmgr.conf'
follow_command='repmgr standby follow -f /etc/repmgr/repmgr.conf'