From 8b1e252589ea6d3945b2943652bd4c349a101094 Mon Sep 17 00:00:00 2001 From: Bernhard Radermacher Date: Mon, 23 Feb 2026 12:56:52 +0100 Subject: [PATCH] speed up failover --- entrypoint.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index b5144c1..be5fcc3 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -116,11 +116,13 @@ repmgr_setup_conf() { printf "use_replication_slots = on\n" printf "pg_bindir = '/usr/lib/postgresql/15/bin/'\n" printf "\n" - printf "failover = automatic\n" - printf "promote_command = '/usr/bin/repmgr standby promote -f /etc/repmgr/repmgr.conf --log-to-file'\n" - printf "follow_command = '/usr/bin/repmgr standby follow -f /etc/repmgr/repmgr.conf --log-to-file --upstream-node-id=%n'\n" + printf "failover = automatic\n" + printf "promote_command = '/usr/bin/repmgr standby promote -f /etc/repmgr/repmgr.conf --log-to-file'\n" + printf "follow_command = '/usr/bin/repmgr standby follow -f /etc/repmgr/repmgr.conf --log-to-file --upstream-node-id=%n'\n" + printf "reconnect_attempts = 3\n" + printf "reconnect_interval = 5\n" } > /etc/repmgr/repmgr.conf - +reconnect_interval } sudo service ssh start