Specify multiple host connections for PostgreSQL / Database Fail-Over
DamirAhm opened this issue · 0 comments
DamirAhm commented
Problem
According to PostgreSQL documentation, it is possible in PostgreSQL to specify multiple hosts to connect to. I would like to use this option with pgboss as a part of a failover strategy (in conjunction with the target_session_attrs parameter). Unfortunately it seems that this is not possible at the moment as I'm getting TypeError: Invalid URL error while trying to pass something like URI below to connectionString.
postgresql://database:password@host1:5432,host2:5432/database?target_session_attrs=read-write
Suggested solution
Add a feature that allows you to insert multiple hosts in the database connection string separated by commas. This value could then be forwarded to the underlying PG connection string.