我用REPMGR配置了PostgreSQL自动故障转移。但是,在我的模拟中,每次重新连接尝试都需要1秒的睡眠时间:

如果我查阅正式文档,则默认值为重新连接间隔为10秒.重新连接间隔为10秒.。
#reconnect_interval=10 #尝试重新连接到不可访问的#主节点(或其他上游节点)之间的间隔
我试图在repmgr.conf中更改重新连接尝试和间隔的值,并重新启动repmgr的服务,并使用"repmgr备用寄存器-强制“,但不起作用。
我的REPMGR.CONF
node_id = 2
node_name = 'PGCluster02'
data_directory='/var/lib/postgresql/12/main'
conninfo = 'host=PGCluster02 port=1010 user=my_repmgr dbname=dbrepmgr connection_timeout=2'
use_replication_slots=1
reconnect_attempts=30
reconnect_interval=10
failover=automatic
promote_command='/usr/bin/repmgr standby promote -f /etc/repmgr.conf --log-to-file'
follow_command='/usr/bin/repmgr standby follow -f /etc/repmgr.conf --log-to-file --upstream-node-id=%n'环境
PostgreSQL Version: 12.5
REPMGR Version: 5.2
Debian version: 10我环境中的其他工具是Barman (另一个VM)和PGBouncer (当前VM)。
如何将重新连接间隔更改为10秒或15秒?有人能帮我吗?我想把我的故障恢复时间延长到5分钟。
谢谢你!!
发布于 2020-12-04 11:07:19
https://dba.stackexchange.com/questions/280180
复制相似问题