If you can afford a one off 1 second of latency for your SQL queries, then using logical replication with pgbouncer seems way easier :<p>- setup logical replication between the old and the new server (limitations exist on what is replicated, read the docs)<p>- PAUSE the pgbouncer (virtual) database. Your app will hang, but not disconnect from pgbouncer<p>- Copy the sequences from the old to new server. Sequences are not replicated with logical replication<p>- RESUME the pgbouncer virtual database.<p>You're done. If everything is automated, your app will see a temporary increase of the SQL latency. But they will keep their TCP connections, so virtually no outage.