patroni
PostgreSQL High-Available orchestrator and CLI
Decision gist · record as of 2026-08-14
Yes. Patroni is production-stable (Development Status 5), actively maintained with recent releases, has no known vulnerabilities, and low install friction. It is the standard choice for PostgreSQL HA orchestration in environments using etcd, Consul, ZooKeeper, or Kubernetes. Install it if you need automated failover and cluster coordination; skip it if you manage PostgreSQL replication manually or use a managed database service.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a running distributed configuration store (etcd, Consul, ZooKeeper, or Kubernetes) and a PostgreSQL driver (psycopg, psycopg2, or psycopg2-binary) installed separately.
- Low install friction with a pure-Python wheel and eight straightforward runtime dependencies.
- Actively maintained with a recent release (2 days old) and 8656 GitHub stars, indicating a mature and well-supported project.
License · maintenance · safety
The MIT License (permissive) — MIT License (permissive) places no restrictions on use, modification, or redistribution in proprietary or open-source contexts.
last release 2026-08-12 (2 days) · last repo commit 2026-08-12 · 8,656 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 93,981 downloads/mo, #13,350 on PyPI
Alternatives
Verify before relying
pip install patroni[etcd3]
Then configure a postgres0.yml file and run:
./patroni.py postgres0.yml
Patroni will manage PostgreSQL replication and failover via your chosen DCS.- Whether Python 3.11+ memory issue (mentioned in description) affects typical deployments or only those with strict vm.overcommit_memory=2 settings.
- Performance characteristics and scalability limits for clusters beyond three nodes.
- Whether Citus extension integration (noted as available since 3.0) is production-ready or experimental.
What it is and what it does
Patroni is a Python orchestration framework that automates PostgreSQL high-availability cluster management by coordinating replica promotion, failover, and configuration across multiple nodes using a distributed consensus store. It supports PostgreSQL 9.3 to 18 and integrates with etcd, Consul, ZooKeeper, Kubernetes, and Raft as its backing configuration and state store.
You deploy Patroni on each PostgreSQL node in your cluster; it handles leader election, streaming replication setup, and automatic failover when the primary becomes unavailable. It includes HAProxy integration for a single application endpoint and supports both asynchronous and synchronous replication modes. Configuration is YAML-based with environment variable overrides, and the package includes a REST API for monitoring and control.
Use it for
- Automate failover and replica promotion in multi-node PostgreSQL deployments without manual intervention.
- Manage PostgreSQL cluster state and configuration consistently across nodes using etcd or Consul as a distributed store.
- Integrate PostgreSQL high availability with Kubernetes by running Patroni natively on K8s clusters.
- Set up streaming replication with automatic synchronization and durability guarantees across geographically distributed replicas.
- Monitor and control PostgreSQL cluster health and member status via REST API from external orchestration tools.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Patroni is production-stable (Development Status 5), actively maintained with recent releases, has no known vulnerabilities, and low install friction. It is the standard choice for PostgreSQL HA orchestration in environments using etcd, Consul, ZooKeeper, or Kubernetes. Install it if you need automated failover and cluster coordination; skip it if you manage PostgreSQL replication manually or use a managed database service.
Install
patroni on PyPI
Before you install
Low install friction with a pure-Python wheel and eight straightforward runtime dependencies. Actively maintained with a recent release (2 days old) and 8656 GitHub stars, indicating a mature and well-supported project.
Requires a running distributed configuration store (etcd, Consul, ZooKeeper, or Kubernetes) and a PostgreSQL driver (psycopg, psycopg2, or psycopg2-binary) installed separately.
License in practice
MIT License (permissive) places no restrictions on use, modification, or redistribution in proprietary or open-source contexts.
Quickstart
pip install patroni[etcd3]
Then configure a postgres0.yml file and run:
./patroni.py postgres0.yml
Patroni will manage PostgreSQL replication and failover via your chosen DCS.
Verify before relying
- Whether Python 3.11+ memory issue (mentioned in description) affects typical deployments or only those with strict vm.overcommit_memory=2 settings.
- Performance characteristics and scalability limits for clusters beyond three nodes.
- Whether Citus extension integration (noted as available since 3.0) is production-ready or experimental.
Package facts
| License | The MIT License permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 8 packagesurllib3PyYAMLpy-consulclickprettytablepython-dateutilpsutilydiff |
| Maintenance | Actively maintained 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 93,981 / month, #13,350 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: System AdministratorsOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIX :: BSD :: FreeBSDOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPython |
Evidence: patroni-4.1.5-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “postgresql high availability clustering”
- patroniPatroni orchestrates PostgreSQL high-availability clusters using…
- fastjetFastJet provides Python bindings to the FastJet C++ library for…
- valkey-glideValkey GLIDE is an official async and sync Python client for Valkey…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also apache-airflow-providers-postgres · testgres · kazoo · psycopg2-pool · consulate · django-db-geventpool · python-etcd · psycopg-pool · postgres-mcp · rucio-clients