TL;DR: A repmgr cluster handles automatic failover — but applications still need to know which node is the current primary.
Keepalived solves this with a floating Virtual IP (VIP) that moves automatically to whichever node holds the primary role.
This guide adds a VIP to an existing PostgreSQL 18 + repmgr cluster on Ubuntu 24.04 using Keepalived 2.x.
Every step has been run live on a real cluster and the output verified.
Continue reading “PostgreSQL repmgr with Keepalived Adding a Floating VIP”