Guide

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 situationUsual fitWhy
PostgreSQL on Kubernetes or OpenShift, platform team comfortable with operatorsCloudNativePGIt talks to the Kubernetes API and manages replicas, services, backups and rolling updates as one resource
PostgreSQL on VMs or bare metalPatroniIt is not tied to Kubernetes and supports ZooKeeper, etcd and Consul as its configuration store
Kubernetes, and you already run Patroni elsewhereEitherPatroni runs natively on Kubernetes, so staying consistent is a fair reason
Nobody wants to own failover, backups and upgradesA managed serviceThe provider carries the runbooks and the on-call
Data must stay on your cluster and you want it operated for youCloudNativePG run by a providerSee 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.

CloudNativePGPatroni
What it isA 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 runsKubernetes only; the README lists non-Kubernetes use as out of scopeAnywhere PostgreSQL runs; the docs say it also runs natively on Kubernetes
Where leader state livesThe Kubernetes API, with a per-cluster lease for safe electionsA distributed configuration store: ZooKeeper, etcd, Consul or Kubernetes; the docs say to run etcd, ZooKeeper or Consul with 3 or 5 nodes
FailoverOperator promotes the most up-to-date replicaPatroni agents elect a leader through the store; the docs describe automatic failover on 2-node clusters too
ReplicationStreaming replication; quorum and priority-based synchronous modesStreaming replication, asynchronous by default, with a maximum lag setting for failover and optional synchronous mode
Backups and PITRThrough plugins (Barman Cloud) or volume snapshots, managed in the Cluster resourceNot part of Patroni itself; the docs show integration with other tools such as Barman
Client endpointOperator-managed read-write and read-only services, plus a PgBouncer-based PoolerPatroni's REST API for health checks; the docs provide an HAProxy configuration for a single leader endpoint
Minor and major upgradesRolling minor updates; three major-upgrade methods including in-place pg_upgradeYou orchestrate upgrades with the tool set you choose
LicenceApache License 2.0MIT licence (GitHub repository)
Latest release on GitHub, 17 Nov 20261.30.24.1.5, published 12 Aug 2026
Supported PostgreSQL15 to 18 for the 1.30 line9.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.

OptionYou ownA provider ownsFits when
CloudNativePG, self-runKubernetes, the operator, backups, restores, upgrades, on-callNothingA platform team already runs stateful workloads and wants full control
Patroni, self-runThe hosts, the configuration store, Patroni, backups, pooling, upgrades, on-callNothingPostgreSQL lives on VMs or bare metal and the team knows the stack
A cloud database serviceSchema and queriesInfrastructure and most operations, within the planA standard plan holds the workload and you accept the provider's limits; see turnkey limits
CloudNativePG, run by OSStendThe Kubernetes or OpenShift clusterCluster 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 managedSchema and queriesCluster and operations, in OSStend's cloud or your cloud accountYou 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.

Operated by AceMQCompany figures, as published on acemq.com
160+AceMQ customers
10+Years running these systems
24/7Engineers on call

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.

Talk to an engineer

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
See pricing →

Your request goes to the OSStend team. No newsletter sign-up.

Get a quoteTalk to an engineer
2Engines
3Where should it run?
4What do you need?

Your request goes to the OSStend team. No newsletter sign-up.