PostgreSQL复制管理器-repmgr
2020-10-27 12:50:34 阿炯

本站赞助商链接,请多关照。 repmgr是由第二象限(2ndQuadrant)公司于2010年推出的一款开源的PostgreSQL服务器集群复制管理和故障转移的工具。它扩展了PostgreSQL内建的hot-standby能力,可以设置热备份服务器、监控复制、执行管理任务(故障转移、手工切换等),采用C语言开发并在GPLv3协议下授权。


repmgr - Replication Manager for PostgreSQL clusters

repmgr is an open-source tool suite for managing replication and failover in a cluster of PostgreSQL servers. It enhances PostgreSQL's built-in hot-standby capabilities with tools to set up standby servers, monitor replication, and perform administrative tasks such as failover or manual switchover operations.

repmgr has provided advanced support for PostgreSQL's built-in replication mechanisms since they were introduced in 9.0. The current repmgr series, repmgr 5, supports the latest developments in replication functionality introduced from PostgreSQL 9.3 such as cascading replication, timeline switching and base backups via the replication protocol.

repmgr帮助DBA和系统管理员管理PostgreSQL数据库集群。通过利用PostgreSQL 9中引入的Hot Standby功能,repmgr极大地简化了设置和管理具有高可用性和可伸缩性要求的数据库的过程。

repmgr通过以下方式简化了管理和日常管理,提高了生产力并降低了PostgreSQL集群的总体成本:
监视复制过程
允许DBA发布高可用性操作,例如切换和故障切换。

repmgr 2.x需要PostgreSQL 9.1或9.2,repmgr 3+需要PostgreSQL 9.3或更高版本。
    

最新版本:5.2
版本增加了对 PostgreSQL 13 的支持,并包括一些常规改进,重要的增强和错误修复。包括:
配置:支持 include、include_dir 和 include_if_exists 指令 。
repmgr 备用切换:改进来自降级候选节点的完整性故障检查日志输出。如果数据库连接配置在所有节点间不一致,那么远程 repmgr 调用(例如,在切换期间,从升级候选节点到降级候选节点)可能无法连接到数据库。现在,这将被明确报告为数据库连接失败,而不是各自的完整性检查失败。
repmgr cluster crosscheck / repmgr cluster matrix:改进文本模式输出格式,尤其是以便正确显示任意长度的节点标识符。
repmgr primary unregister:--force可以取消活动主节点的注册,前提是该节点没有已注册的备用节点。
repmgr 节点检查:如果提供了--optformat,则报告数据库连接错误。
改进 pg_control 读取错误的处理。
现在可以使用 pg_dump 转储 repmgr 元数据表的内容。
配置选项 always_promote (default: false)用于控制某个节点上的 repmgr 元数据如果不是最新的,是否应该升级该节点。  

Bug修复:
repmgr standby clone:  解决了从 Barman 进行克隆的问题。
repmgr node rejoin:确保验证备用节点已连接到其上游时,该节点在确认重新加入操作之前已经开始流处理。
repmgrd:如果与上游相同,请确保主连接已重置。

更多更新详情查看这里

官方主页:https://repmgr.org

https://wiki.postgresql.org/wiki/Repmgr

https://github.com/2ndQuadrant/repmgr