repmgr学习记录(主从切换)

1.服务器状态:一主二备node

2.停主库:pg_ctl -D /home/postgres/PG-9.6.1/ stop服务器

  此时node二、node3仍均处于read-only状态post

3.将node2恢复为主库:repmgr -f repmgr.conf standby promote3d

  此时node3仍然尝试链接node1code

4.将node3指向新的master:blog

  repmgr -f repmgr.conf -D /home/postgres/PG-9.6.1/ -h 192.168.98.63 -U repmgr -d repmgr standby followit

 

主动的主从切换repmgr -f /etc/repmgr.conf -C /etc/repmgr.conf standby switchover -vast

 

Automatic failover with repmgrdim

相关文章
相关标签/搜索