Closed gordonjb closed 3 years ago
I'm interested in this as well
Hi @gordonjb and @nenominal.
In PostgreSQL (and RDBMS) world a failover can't be transparent. Even when done without data loss, applications still need to reconnect to the new primary, and connections to Postgres are stateful because of session level objects that SQL allows you to create (prepared statements, temporary tables, cursors, etc).
In short that would be a very bad idea. Please make it so that your primary and secondary nodes are all the same and that you don't have to care about which one is currently playing which role. Naming conventions go a long way, that's why we have node1 and node2 rather than other names.
In a scenario where failover occurs from primary to secondary, is it possible to set up pg_autofailover such that when the old primary is available again, it will fail back to the primary? From what I read, candidate_priority would only be taken into account during a failover