CloudNativePG vs Patroni vs a managed service: how to choose
Three ways to get PostgreSQL high availability: run CloudNativePG on Kubernetes, run Patroni on VMs or Kubernetes, or hand the operations to a managed service. This guide sets them side by side from each project's own docs.
- ✓Docs read 17 Nov 2026
- ✓OSStend runs CloudNativePG
Choose CloudNativePG when PostgreSQL runs on Kubernetes and you want the cluster described declaratively, Patroni when it runs on VMs or bare metal or you already operate a distributed configuration store, and a managed service when you do not want to own failover, backups and upgrades at all. OSStend runs CloudNativePG for customers, so weigh this as a vendor's view. Docs read 17 Nov 2026.
CloudNativePG or Patroni: which should you choose?
If PostgreSQL runs on Kubernetes, start with CloudNativePG: it is built for that platform and manages the whole cluster, not only failover. If it runs on VMs or bare metal, or your team already runs etcd or Consul, Patroni is the established choice. If nobody wants the pager, buy the operations.
| Your situation | Usual fit | Why |
|---|---|---|
| PostgreSQL on Kubernetes or OpenShift, platform team comfortable with operators | CloudNativePG | It talks to the Kubernetes API and manages replicas, services, backups and rolling updates as one resource |
| PostgreSQL on VMs or bare metal | Patroni | It is not tied to Kubernetes and supports ZooKeeper, etcd and Consul as its configuration store |
| Kubernetes, and you already run Patroni elsewhere | Either | Patroni runs natively on Kubernetes, so staying consistent is a fair reason |
| Nobody wants to own failover, backups and upgrades | A managed service | The provider carries the runbooks and the on-call |
| Data must stay on your cluster and you want it operated for you | CloudNativePG run by a provider | See managed CloudNativePG |
How we compared: each project's own documentation and repository, checked 17 Nov 2026. OSStend is a vendor that runs CloudNativePG, which is why a CloudNativePG service sits in the last row; the other rows rest on what the projects state. We did not install or benchmark either tool and quote no performance figure.
CloudNativePG vs Patroni: what is the difference?
CloudNativePG is a Kubernetes operator that manages whole PostgreSQL clusters. Patroni is a template for PostgreSQL high availability that you combine with a configuration store, a load-balancing layer and backup tooling.
| CloudNativePG | Patroni | |
|---|---|---|
| What it is | A Kubernetes operator for PostgreSQL, built by EDB and a CNCF incubating project (docs, checked 17 Nov 2026) | A template for PostgreSQL high-availability clusters, written in Python (docs, checked 17 Nov 2026) |
| Where it runs | Kubernetes only; the README lists non-Kubernetes use as out of scope | Anywhere PostgreSQL runs; the docs say it also runs natively on Kubernetes |
| Where leader state lives | The Kubernetes API, with a per-cluster lease for safe elections | A distributed configuration store: ZooKeeper, etcd, Consul or Kubernetes; the docs say to run etcd, ZooKeeper or Consul with 3 or 5 nodes |
| Failover | Operator promotes the most up-to-date replica | Patroni agents elect a leader through the store; the docs describe automatic failover on 2-node clusters too |
| Replication | Streaming replication; quorum and priority-based synchronous modes | Streaming replication, asynchronous by default, with a maximum lag setting for failover and optional synchronous mode |
| Backups and PITR | Through plugins (Barman Cloud) or volume snapshots, managed in the Cluster resource | Not part of Patroni itself; the docs show integration with other tools such as Barman |
| Client endpoint | Operator-managed read-write and read-only services, plus a PgBouncer-based Pooler | Patroni's REST API for health checks; the docs provide an HAProxy configuration for a single leader endpoint |
| Minor and major upgrades | Rolling minor updates; three major-upgrade methods including in-place pg_upgrade | You orchestrate upgrades with the tool set you choose |
| Licence | Apache License 2.0 | MIT licence (GitHub repository) |
| Latest release on GitHub, 17 Nov 2026 | 1.30.2 | 4.1.5, published 12 Aug 2026 |
| Supported PostgreSQL | 15 to 18 for the 1.30 line | 9.3 to 18 |
Sources: CloudNativePG docs, failover, backup, supported releases and releases; Patroni docs, README, tools integration, releases and repository; all checked 17 Nov 2026. Patroni's docs describe HA; a cell that says it is not part of Patroni means the docs do not describe it, not that no one has built it.
From our on-call engineers: Patroni timers and what they mean for failover
Patroni's failover time and false-failover risk come from three timers. Knowing their defaults and the rule that links them tells you how long a leader failure takes to be noticed and how a flaky network can trigger an unneeded failover.
- ✓Patroni's documented defaults are loop_wait 10 seconds, ttl 30 seconds and retry_timeout 10 seconds, and changes must satisfy loop_wait + 2 * retry_timeout <= ttl.
- ✓Patroni's FAQ says that if the distributed configuration store is unresponsive for more than retry_timeout, it might demote the primary as a safety action, so the store's health is part of database availability.
- ✓use_pg_rewind is false by default, so a former primary that diverged is re-cloned unless you enable it and the prerequisites for pg_rewind are in place.
- ✓synchronous_mode accepts off, on or quorum, trading commit latency for the guarantee that a promoted replica holds acknowledged commits.
- ✓CloudNativePG fails over automatically within a Kubernetes cluster and repoints its read-write service to the promoted primary, but its docs say cross-cluster failover is manual, so the failover design differs from a Patroni stack.
- ✓In Kubernetes Postgres we have been asked to stabilise, long replica clone times and frequently crashing replicas were the reported symptoms, which is why we test the replica rebuild path, not only the promotion.
How does failover work in each?
Both promote a replica when the primary is lost, and both need something outside PostgreSQL to decide who the leader is. CloudNativePG uses Kubernetes objects for that; Patroni uses a distributed configuration store.
PostgreSQL itself ships no software to detect a dead primary and promote a standby. CloudNativePG's operator marks the target primary as pending, which forces the failing primary to shut down so its WAL receivers stop, then elects and promotes a new primary; a Kubernetes lease named after the cluster keeps two instances from promoting at once (failover docs, checked 17 Nov 2026). Patroni runs an agent beside each PostgreSQL instance and agrees on the leader through the configuration store, with a REST API for health checks and for switchover and failover requests (docs, checked 17 Nov 2026).
In both, whether a commit survives losing the primary depends on replication mode, not the tool. Asynchronous replication can lose the last transactions; synchronous or quorum replication costs write latency. That choice belongs in the design, and it is the same decision under either tool.
What about backups, pooling and upgrades?
CloudNativePG includes backups, a connection pooler and upgrade orchestration in the same resource. Patroni stays focused on high availability, so you assemble the rest.
- Backups.
- CloudNativePG supports base backups, WAL archiving and point-in-time recovery through plugins and volume snapshots (backup docs). With Patroni you choose a backup tool, and its docs include a Barman integration (tools). Either way, only base backups plus archived WAL restore to a moment.
- Connection pooling.
- CloudNativePG has a native PgBouncer-based pooler (docs). With Patroni you place a pooler yourself.
- Upgrades.
- CloudNativePG rolls minor versions replicas-first and supports three major-upgrade methods (docs). With Patroni, upgrades are a procedure you write and run.
- The common part.
- Someone must test restores, watch replication lag and archive health, and keep a rollback path for each upgrade. A tool does not remove that work.
When is a managed service the better choice?
A managed service is the better choice when the cost of owning the operations, including on-call, restore drills and upgrade planning, is higher than the fee, or when you have no one to own them.
| Option | You own | A provider owns | Fits when |
|---|---|---|---|
| CloudNativePG, self-run | Kubernetes, the operator, backups, restores, upgrades, on-call | Nothing | A platform team already runs stateful workloads and wants full control |
| Patroni, self-run | The hosts, the configuration store, Patroni, backups, pooling, upgrades, on-call | Nothing | PostgreSQL lives on VMs or bare metal and the team knows the stack |
| A cloud database service | Schema and queries | Infrastructure and most operations, within the plan | A standard plan holds the workload and you accept the provider's limits; see turnkey limits |
| CloudNativePG, run by OSStend | The Kubernetes or OpenShift cluster | Cluster design, failover, backups, upgrades, 24/7 on-call (co-managed) | You run Kubernetes, want PostgreSQL on it and not the pager; see managed CloudNativePG |
| PostgreSQL, fully managed | Schema and queries | Cluster and operations, in OSStend's cloud or your cloud account | You want the infrastructure run too; see managed PostgreSQL |
OSStend is our service and is listed twice. A cloud database service is the cheaper choice when a standard plan holds the workload. Prices for OSStend are quoted per design after a workload review.
FAQ
Is CloudNativePG better than Patroni?
Neither is better everywhere. CloudNativePG fits PostgreSQL on Kubernetes, where it manages the whole cluster. Patroni fits PostgreSQL on VMs or bare metal, and it also runs on Kubernetes. The deciding questions are where PostgreSQL runs and what your team already operates.
Does CloudNativePG use Patroni?
No. The CloudNativePG README says it integrates directly with the Kubernetes API instead of relying on external high-availability tools such as Patroni, repmgr or Stolon (README, checked 17 Nov 2026).
Can Patroni run on Kubernetes?
Yes. Patroni's docs say it runs natively on Kubernetes and can use Kubernetes as its configuration store (docs, checked 17 Nov 2026).
Does CloudNativePG use StatefulSets?
No. Its docs say it manages Persistent Volume Claims directly through its own pod controller instead of StatefulSets (docs, checked 17 Nov 2026).
Who runs CloudNativePG for me?
OSStend engineers run it on your Kubernetes or OpenShift cluster as a co-managed service. See managed CloudNativePG.
Where do I read about the rest of PostgreSQL high availability?
Managed PostgreSQL covers how OSStend designs replicas, failover and recovery, and PostgreSQL on Kubernetes covers the platform side.
Related pages
- Deployment · CloudNativePGManaged CloudNativePG: Postgres on your KubernetesCloudNativePG run for you on your own Kubernetes or OpenShift: high availability, backups, upgrades and 24/7 operations by OSStend engineers.
- Research · Original dataManaged service limits index, checked 9 Nov 2026A managed service limits index: 13 documented limits of Amazon MQ, MSK, ElastiCache, Neon, Supabase and Instaclustr, each with its source link and date.
- PostgreSQLManaged PostgreSQL service and Postgres hostingManaged PostgreSQL service, compared: how to choose between RDS, Aiven, Crunchy Bridge, Neon and a tailored cluster run 24/7 in your cloud or ours.
- Deployment · Your data centerPostgreSQL on Kubernetes, managed by OSStendRun PostgreSQL on Kubernetes and Kafka on your own cluster, co-managed by OSStend through an operator with supported charts and images, 24/7.
Take the question to an engineer
45 minutes: your PostgreSQL workload and platform are reviewed, and an engineer says which option fits.
- ✓A design sketch for your workload, not a plan menu
- ✓A zero-downtime cutover path for what you run today
- ✓A price for that design, after the review