-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostgreSQL multiple hosts configuration and database cluster failover #7247
Comments
Any plan to resolve this? Otherwise it's hard to use Postgres as a backend in production environments. |
Hello, +1. Today, the switch of postgres database need to cut the service, time to allow write access on the failover DB. |
lets use pgx |
It makes more sense to implement multiple hosts support and RW/RO connection selector support rather than what is proposed by the OP (limited to failover). Looking forward to this implementation. Vault will hog the master node of our postgres cluster in production for now. |
Hi, sorry for the delay. I do not have two databases anymore to test this, but I believe that we can close the issue as pgx does handle multiple hosts configuration and target selection. Thanks ! |
The current library used for the physical PostgresSQL backend is lib/pq.
However, this library does not :
To reproduce :
Vault Config excerpt :
Results :
A stale PR has been opened to solve these issues but it seems it won't be merged on this project : lib/pq#714
The pgx project seems to have merged this kind of handling here : jackc/pgx#545
Expected behavior :
It would be nice to support multiple hosts in connection string and target session attributes so that on connection lost Vault would reconnect automatically, enable one to have a database cluster that can failover.
Environment :
Regards,
The text was updated successfully, but these errors were encountered: