Blog

CoyoteDB vs. the usual ways to keep Postgres up

A fair comparison of one Postgres server with backups, managed cloud Postgres, Patroni, pg_auto_failover and Kubernetes operators, and when each is the better choice.

The CoyoteDB team7 min read

There are several good ways to keep a PostgreSQL database running when a computer fails. CoyoteDB is one of them, and it is not the right answer for everyone. This post lays the options side by side, says what each one asks of you, and says plainly when another one is the better choice.

Everything here is about high availability: the database carrying on when one computer stops. If you want the basics first, read What “high availability” actually means for a small app.

The short version

Where your data lives What you run and learn Moving parts Cost model Best for
One Postgres server + backups Your machine or a rented server Postgres and a backup tool 1 server, plus backup storage The server Apps that can be down for a while
Managed cloud Postgres The provider’s data centres The provider’s console and settings Run for you Monthly, by instance size or usage; high availability costs more Teams already in that cloud, multi-region needs
Patroni Your machines Patroni, a consensus store, a proxy Patroni on each node, a 3-node etcd, Consul or ZooKeeper cluster, a proxy such as HAProxy Your machines and your time Teams with operations skills who want full control
pg_auto_failover Your machines pg_autoctl, a monitor, multi-host connection strings A keeper on each node, plus a monitor node Your machines and your time Teams who want a simpler do-it-yourself setup
Kubernetes operators (CloudNativePG, Crunchy PGO) Your Kubernetes cluster Kubernetes, plus the operator The operator, plus everything Kubernetes needs Your cluster and your time Teams that already run Kubernetes well
CoyoteDB Your own computers One app, invite codes, how many computers to use One app on each computer, plus an optional witness The computers you run it on (licence to be decided) Small teams and solo builders without a database specialist

Now the longer version.

One Postgres server with backups

This is where almost everyone starts, and for many apps it is the right place to stay. One server, real Postgres, and a backup tool such as pg_dump or a tool that archives the write-ahead log for point-in-time recovery.

What you give up is time. When that server dies, the app is down until you restore onto another one. With plain nightly dumps you can also lose everything saved since the last dump. With continuous log archiving you can restore close to the moment of failure, but you are still down while you do it.

Choose it when an hour or two of downtime now and then is fine. It is simple, cheap and well understood.

Managed cloud Postgres

Cloud providers run Postgres for you. Amazon RDS has a Multi-AZ option that keeps a synchronous standby in a second availability zone and fails over to it automatically. Google Cloud SQL has a high-availability configuration with a primary and a standby in two zones of one region, and automatic failover. Other hosted Postgres services, such as Supabase and Neon, add their own tools on top and price by plan or by usage.

What you give up is control and a monthly bill. Your data lives in the provider’s data centres. The high-availability option costs more than a single instance. Moving away later is possible, because it is Postgres, but it is a project.

Choose it when your app already runs in that cloud, you want someone else to handle hardware and patching, or you need a database spread across regions. For multi-region in particular, a managed service is a far better fit than CoyoteDB.

Patroni

Patroni is one of the most widely used open-source tools for Postgres high availability. It runs next to Postgres on each server and manages replication and failover. To agree on which server is in charge, it keeps its state in a distributed configuration store: etcd, Consul, ZooKeeper, or Kubernetes itself. Your app usually reaches the current main server through a proxy, such as HAProxy, that checks Patroni’s REST API to find the primary.

It is mature, flexible and used in production by many teams. The cost is the number of pieces. A typical setup is Patroni on every node, a three-node etcd cluster, HAProxy (often with keepalived for a floating address), and sometimes pgBouncer. Each has its own config and its own failure modes, and you need to understand how they fail together.

Choose it when you have, or are, someone who runs infrastructure for a living, and you want to tune every part.

pg_auto_failover

pg_auto_failover is a smaller do-it-yourself option. A keeper process runs on each Postgres node, and a separate monitor node, itself a Postgres instance, holds the state and decides on failover. The minimum is three machines: a primary, a secondary and the monitor. Apps find the current primary with Postgres’s multi-host connection strings and target_session_attrs=read-write, so no proxy is needed.

It has fewer moving parts than a Patroni stack. The monitor is one node: if it is down, replication keeps working, but failover cannot happen until it is back.

Choose it when you are comfortable with Postgres administration and want a simpler self-managed setup than Patroni.

Kubernetes operators

If you already run Kubernetes, an operator handles Postgres for you as a Kubernetes resource. CloudNativePG manages failover itself, using the Kubernetes API, and points a read-write service at the current primary. Crunchy PGO uses Patroni under the hood, with Kubernetes as its store.

These are excellent if Kubernetes is already part of your life. If it is not, you are now learning and running Kubernetes in order to run a database, which is a large step for a small team. Crunchy’s own docs make the point: the high availability of your Postgres cluster is only as good as the high availability of your Kubernetes.

Choose it when you already run Kubernetes well. In that world, an operator is the natural choice.

CoyoteDB

CoyoteDB does the same core jobs, but inside one program. Each computer runs the small coyote app, which runs real PostgreSQL 18, copies data with Postgres’s own streaming replication, and lets the nodes vote on which one is in charge. You join computers with an invite code, over one encrypted port, on a LAN, Tailscale or a site-to-site VPN.

The safety rules are written in plain words. A save counts once two computers have it. The nodes vote on who is in charge. A cut-off node shuts its database down before another node takes over, so two nodes never both think they are in charge. With three computers, or two plus a small witness that only votes, the others take over by themselves when the main one stops.

We test this with real Postgres processes and with chaos tests that kill, freeze and cut off nodes on purpose, while a checker confirms that no acknowledged write was lost and there were never two main nodes at once. A new main node was in place about 10 seconds after a hard kill (6 to 11 seconds), and writes flowed again in roughly 10 to 25 seconds (measured on one Mac, default settings).

It has real limits:

  • It is built for a few computers on one private network or a VPN between a few sites, not for spreading one database across regions.
  • The data computers in one cluster must all be the same system type. The witness and your apps can be anything.
  • Copies do not replace backups. A deleted table is deleted on every node.
  • There is no public download yet.

Choose it when you want a database that survives a dead computer, on machines you own, and you do not have a database specialist to build and look after a stack of tools.

How to decide

  • Fine with some downtime? One server and good backups.
  • Already in a cloud, or need several regions? Managed cloud Postgres.
  • Already running Kubernetes? An operator.
  • Have infrastructure skills and want full control? Patroni or pg_auto_failover.
  • Want it to stay up on your own computers without becoming a database administrator? That is the gap CoyoteDB is built for. Here is why we built it.

Whatever you pick, it is all PostgreSQL, so your data can move between these options with standard Postgres tools.

Sources

Facts about other products come from their own documentation:

Amazon RDS, Google Cloud SQL, Supabase, Neon, Patroni, pg_auto_failover, CloudNativePG, Crunchy PGO, Kubernetes, HAProxy, etcd, Consul, ZooKeeper and Tailscale are names or trademarks of their respective owners. CoyoteDB is not affiliated with them. Checked on 21 November 2026.