Hacker News new | ask | show | jobs
by gfosco 1092 days ago
Have done minimal downtime major version upgrades using standard replication, switching between two "master" servers. In the five minute range.
2 comments

This is also a spot where having failover strategies and circuit breakers can help. Microservices make you think about these things but you don’t have to wait for that forcing function to think about them.

When the database goes down, you have to do something else. Could be the server crashed or could just be a Postgres upgrade. Five minutes is just about the right amount of time for an open circuit to do its job.

Have you done this postgresql/RDS?

Because when I last tried it, the replica has to be the same major version (WAL streaming requires it) and then upgrading it to the latest version can take 10+ hours.

Definitely nowhere near 5 minutes downtime.

You'd want logical replication instead of physical replication. Logical rep doesn't stream the WAL as-is, it streams a representation of the statement that can be replayed on the destination.

It looks like this uses pglogical plugin but there's also a built in decoder I think called "pgoutput"

Self hosted postgres, not RDS.