Menu

1 / 5

PostgreSQL failover drill with Patroni: 35 seconds, 0 lost writes

DEV Community: postgres·Denys Zarubin·about 7 hours ago
#XiVSkCwr
#devtopostgresql#devto#dev#seconds#database
Long article (1895 words) — no AI summary yet.
Reading 0:00
15s threshold

Originally published on moveinfra.eu .

A three-node PostgreSQL cluster run with Patroni lost its primary and accepted writes again after 36.4 seconds in our first drill and 34.6 seconds in the second. In both runs every write that the database had confirmed to the client was still there afterwards: 0 of 146 and 0 of 147 rows missing. We measured this on 17 November 2026 on UpCloud in Helsinki, on the smallest servers and with a near-empty database, so read it as a floor for the mechanism and not as a promise for your data.

The reason to publish it is a discussion that repeats on Hacker News every few months. In the July 2026 thread on a startup's Postgres guide , one side says that running PostgreSQL yourself saves "absolute peanuts" compared with a managed service. The other side says a pair of servers with backups costs under €50 a month and is not hard. Both sides argue from memory. Almost nobody posts what happened when they pulled the plug.

Key takeaways

Failover took 35 to 36 seconds.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.