r2dbc-postgresql: Support for Postgresql multi-host failover functionality
Currently this is unable to support a master-slave scenario for postgresql
basically the equivalent of this:
jdbc:postgresql://postgres_master:5432,postgres_slave:5432/myDb
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 9
- Comments: 17 (1 by maintainers)
Commits related to this issue
- Implement high availability cluster functionality [resolves #120] — committed to kressi/r2dbc-postgresql by kressi 2 years ago
- Polishing Refactor connection creation from composeable ConnectionStrategy into composeable ConnectionFunctions and a parameter-less ConnectionStrategy that holds all connection target details. Refa... — committed to pgjdbc/r2dbc-postgresql by mp911de 2 years ago
Hi, I’ve just written FailoverConnectionFactoryProvider. It works fine for me.
It works without any changes in ConnectionUrlParser, ConnectionFactoryOptions, ConnectionFactoryProvider implementation. It also works with any driver (not only postgresql).
UPD: fixed several issues in the code. UPD2: enhanced the code.
@harishvashistha we are using the solution I provide in production without any issues.