|
|
|
|
|
by jtc331
1516 days ago
|
|
Preconditions: 1. Route all traffic through pgbouncer in transaction pooling mode. 2. Logically replicate from old to new. For failover: 1. Ensure replication is not far behind. 2. Issue a PAUSE on pgbouncer. 3. Wait for replication to be fully caught up. 4. Update pgbouncer config to point to the new database. 5. Issue a RELOAD on pgbouncer. 6. Issue a RESUME on pgbouncer. Zero downtime; < 2s additional latency for in-flight queries at time of op is possible (and I've done it at scale). |
|