
postgresql ha repmgr
数据库人生
专注于数据库
PostgreSQL;Oracle 11G OCA、OCP;OceanBase V2 OBCA、OBCP
展开
-
postgresql 高可用 repmgr 的使用之一 apt install repmgr
os:ubunbu 16.04postgresql:9.6.8repmgr:4.1.1repmgr是2ndquadrant公司维护的针对postgresql replication的工具。工具虽小,却比较精悍。需要注意的是repmgr必须安装在每个节点上。目前在github可以找到该项目 https://github.com/2ndQuadrant/repmgr有三种架构:1 Pr...原创 2018-09-21 15:32:34 · 1569 阅读 · 1 评论 -
postgresql 高可用 repmgr 的使用之十 1 Primary + 2 Standby 的 auto failover 之后失败节点 rejoin
os:ubunbu 16.04postgresql:9.6.8repmgr:4.1.1192.168.56.101 node1192.168.56.102 node2192.168.56.103 node3手动 rejoin$ sudo pg_ctlcluster 9.6 main stop$ repmgr -f /etc/repmgr.conf node rejoin -d '...原创 2018-09-26 12:15:00 · 777 阅读 · 2 评论 -
postgresql 高可用 repmgr 的使用之九 1 Primary + 2 Standby 的 auto failover
os:ubunbu 16.04postgresql:9.6.8repmgr:4.1.1192.168.56.101 node1192.168.56.102 node2192.168.56.103 node3配置好 1 Primary + 2 Standby详细过程略,参考前面的blog。$ repmgr -f /etc/repmgr.conf cluster show ID | ...原创 2018-09-26 11:05:19 · 858 阅读 · 1 评论 -
postgresql 高可用 repmgr 的使用之八 常用的几个命令
stop pgsql$ pg_ctl -D /var/lib/postgresql/9.6/main -m fast stop或者$ sudo pg_ctlcluster 9.6 main stopclone standby$ repmgr -h 10.101.70.90 -U repmgr -d repmgr -f /etc/repmgr.conf standby clone --d...原创 2018-09-25 18:00:45 · 978 阅读 · 0 评论 -
postgresql 高可用 repmgr 的使用之七 /etc/repmgr.conf
/etc/repmgr.conf# more /etc/repmgr.conf############################################### node informationnode_id=1node_name=node1conninfo='host=192.168.56.101 user=repmgr dbname=repmgr connect_ti...原创 2018-09-25 17:32:24 · 1143 阅读 · 0 评论 -
postgresql 高可用 repmgr 的使用之六 1 Primary + 1 Standby 的 auto failover
os:ubunbu 16.04postgresql:9.6.8repmgr:4.1.1192.168.56.101 node1192.168.56.102 node2生产环境确保网络稳定的前提下,数据库能够 auto failover 是最好的状态。如果是同步复制的话,建议配置两个slave,如果是异步复制,也建议配置两个slave。需要实现 auto failover,就需要启用 r...原创 2018-09-25 17:10:25 · 827 阅读 · 0 评论 -
postgresql 高可用 repmgr 的使用之五 1 Primary + 1 Standby 的 manual failover,node rejoin
os:ubunbu 16.04postgresql:9.6.8repmgr:4.1.1192.168.56.101 node1192.168.56.102 node2操作前/etc/repmgr.conf 的内容node1 节点上的文件内容,node2 节点上类似$ cat /etc/repmgr.conf node_id=1node_name=node1conninfo='...原创 2018-09-25 11:07:52 · 1414 阅读 · 0 评论 -
postgresql 高可用 repmgr 的使用之四 1 Primary + 1 Standby 的 switchover
os:ubunbu 16.04postgresql:9.6.8repmgr:4.1.1192.168.56.101 node1192.168.56.102 node2按照上一遍blog安装好 1 Primary + 1 Standby。编辑 /etc/sudoers# vi /etc/sudoerspostgres ALL = NOPASSWD: /usr/bin/pg_ctlc...原创 2018-09-24 21:36:26 · 989 阅读 · 1 评论 -
postgresql 高可用 repmgr 的使用之三 1 Primary + 1 Standby 安装
os:ubunbu 16.04postgresql:9.6.8repmgr:4.1.1192.168.56.101 node1192.168.56.102 node2安装 postgresql 9.6 软件node1、node2都需要使用 apt install 安装 postgreql9.6.8,最后一位代表的是补丁号# apt install postgresql-plpytho...原创 2018-09-24 19:21:07 · 1581 阅读 · 3 评论 -
postgresql 高可用 repmgr 的使用之二 repmgr --help、repmgrd --help
os:ubunbu 16.04postgresql:9.6.8repmgr:4.1.1repmgr -f /etc/repmgr.conf --help$ repmgr -f /etc/repmgr.conf --helprepmgr: replication management tool for PostgreSQLUsage: repmgr [OPTIONS] prim...原创 2018-09-24 15:59:59 · 906 阅读 · 0 评论 -
postgresql 高可用 repmgr 的使用之十一 1 Primary + 3 Standby + 1 Witness
os: ubuntu 16.04db: postgresql 9.6.8repmgr: 4.2ip 规划如下192.168.56.94 witness1192.168.56.92 node1192.168.56.90 node2192.168.56.88 node3192.168.56.86 node41 Primary + 3 Standby + 1 W...原创 2019-03-14 17:25:42 · 1374 阅读 · 1 评论