3 ms·
PG's internal wal-level replication? primary to a read-replica, and then switch the read to become the primary. You'll have a bit of downtime while you stop con
by andruby 2y ago
PG's internal wal-level replication? primary to a read-replica, and then switch the read to become the primary. You'll have a bit of downtime while you stop connections on the original server, switch the new server to primary, and update your app config to connect to the new server.
I believe that's a pretty standard way to provide "HA" postgres. (We use Patroni for our HA setup)
https://github.com/patroni/patroni https://github.com/patroni/patroni
- dikei 2y agoWe use the same setup, though we use PGBouncer so after switching primary we just force reconnect all clients from PGBouncer instead. The clients will have to retry on-going transactions, but that's a basic fault tolerant requirement anyway.