3 ms·
I guess this is pretty similar to what heroku does for pg updates? If using this tool for upgrades with minimal downtime, if I understand right, you need to or
by jrochkind1 3y ago
I guess this is pretty similar to what heroku does for pg updates?
If using this tool for upgrades with minimal downtime, if I understand right, you need to orchestrate your db callers to switch over to the new primary at the right point, when it's ready? Tips for getting that to happen at just the right point to minimize downtime?
- shayonj 3y agoGreat question: so you can watch the stats command. The command returns a JSON every second which has a switchover_completed_at field. It is updated the as soon as the switchover is complete. UPDATE: Some more reading material here: https://github.com/shayonj/pg_easy_replicate#switchover-strategies-with-minimal-downtime https://github.com/shayonj/pg_easy_replicate#switchover-stra...
- jrochkind1 3y agoVery nice, thanks.
- nijave 3y agoConnect through a single pgbouncer instance and use pgbouncer to orchestrate the switchover by hot reloading/updating the config