pg_auto_failover

Automated PostgreSQL high availability

pg_auto_failover monitors PostgreSQL nodes and manages failover automatically using native PostgreSQL streaming replication. A clear, predictable HA model without complex external orchestration.

What pg_auto_failover does

Automatic promotion with zero data loss

pg_auto_failover runs a monitor that tracks the health of primary and standby nodes. When the primary fails, the monitor promotes the standby and reconfigures the cluster — no manual intervention, no data loss, no external dependencies.

Why it matters

Manual failover is slow and error-prone under pressure

  • Primary failures happen at the worst possible time
  • Manual promotion steps are risky when you're half-awake at 3am
  • External tools add operational complexity and new failure modes
  • pg_auto_failover uses PostgreSQL's own replication — nothing to learn, nothing to trust blindly

Typical use cases

Where pg_auto_failover fits

  • Production PostgreSQL clusters requiring HA without Patroni complexity
  • Kubernetes deployments needing predictable failover
  • Teams who want HA behaviour they can reason about and test
  • On-premise and cloud environments alike

Key capabilities

Built on PostgreSQL native features

  • Automatic failover with synchronous replication
  • Zero data loss on controlled failover
  • Monitor node coordinates the cluster state machine
  • Works with any number of standby nodes
  • Simple CLI for setup and operations

Current focus

Active maintenance areas

Current work focuses on PostgreSQL version compatibility, Kubernetes operator integration, stability improvements for edge cases in network partition scenarios, and documentation.

How maintenance works

Queue, SLA, quarterly releases

Work is prioritized through a queue. Supported users receive priority handling, with defined response times. Fixes and improvements are grouped and shipped in quarterly releases.

Get pg_auto_failover

Open source and available now

pg_auto_failover is open source and available as a PostgreSQL extension. Packages are available for Debian, Ubuntu, and RPM-based distributions, and a Docker image is provided.

Support pg_auto_failover

Keep high availability reliable

If pg_auto_failover protects your production PostgreSQL cluster, supporting its maintenance ensures continued compatibility, faster fixes, and confidence in the behaviour you depend on.

Get the most out of PostgreSQL in production

Sharpen your skills, improve reliability, move faster

If you run PostgreSQL in production, the difference is not just tooling—it's how well you use it. Query design, data modeling, migrations, and performance tuning directly impact reliability and delivery speed.

The Art of PostgreSQL offers a complete, structured program to help you level up: from fundamentals to advanced production patterns, with practical, hands-on material you can apply immediately.