postgresql 高可用_PostgreSQL的高可用方案repmgr

repmgr – simplified management of replication, failover, & switchover for PostgreSQL clusters
repmgr is the most popular tool for PostgreSQL replication and failover management. repmgr simplifies administration and daily management, enhances productivity and complements built-in replication capabilities in PostgreSQL.
Introduced by 2ndQuadrant in 2010, repmgr takes advantage of PostgreSQL’s Hot Standby capability and greatly simplifies the process of setting up and managing databases with high availability and scalability requirements.DocumentationFAQ’sReporting Issues

Availabilityrepmgr v5.1 released – April 13, 2020repmgr is available via 2ndQuadrant’s YUM repository for the Red Hat family (RHEL, CentOS, and Fedora) and PGDG’s APT repository for Debian (please use the test repository for the Beta version – more details at the installation instruction link below). You can use standard yum and apt package managers for installing repmgr with your instance of PostgreSQL.
(repmgr requires PostgreSQL 9.3 or higher)

Configurations
The images and explanation below represent some of the most common configurations of repmgr in production databases.1 Primary + 1 Standby

2eb35b30fb3c51a3841773cb378984d8.png


Here, repmgr is configured on Standby for failover in case the Primary node fails.1 Primary + 2 Standbys

5ec8afda1602f996b4be75356b7006d0.png


Here, repmgr is configured on 2 Standby nodes for failover in case the Primary node fails. Additional Standby node is configured for High Availability (HA) so at least one Standby is still present after failover.1 Primary + 3 Standbys + 1 Witness

19b7d73a8b94a3045ea1efcd89f52035.png


Here, the Standby in Location B is a last resort in case Location A becomes entirely unavailable. The Witness server here ensures that in case of network interruption between the two locations, the Standby at Location B does not promote itself to Primary, i.e. prevents the Split Brain scenario.

License
repmgr is free and open-source software licensed under the GNU Public License (GPL) v3. This means you are free to use and modify repmgr as you see fit, however any modifications you make may only be distributed under the same terms. Click here for details.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值