5 ms·
Have done minimal downtime major version upgrades using standard replication, switching between two "master" servers. In the five minute range.
by gfosco 3y ago
Have done minimal downtime major version upgrades using standard replication, switching between two "master" servers. In the five minute range.
- hinkley 3y agoThis 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.
- oulu2006 3y agoHave 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.
- gfosco 3y agoSelf hosted postgres, not RDS.
- nijave 3y agoYou'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"