eclipse-vertx / eclipse-vertx/vertx-sql-client

PgClient: support multi hosts connection

Open
#1,250 8 comments 1 reaction 1 assignee Claimed by @tsegismont View on GitHub
enhancement module:pg
Dominant language
Java
Stars
912
Forks
212
Avg merge
17h 30m
Merged PRs (30d)
3

Description

#### Describe the feature

[here](https://github.com/eclipse-vertx/vertx-sql-client/blob/master/vertx-pg-client/src/main/java/io/vertx/pgclient/impl/PgConnectionUriParser.java#L42) I saw that we cannot connect to a multi hosts instance of postgres which is mandatory for us.

Can you plan supporting multi hosts connection ?

#### Use cases

Use case: Support high availbility postgresql instances

As an example, with the classic jdbc driver, we can define this property to connect to our HA postgres instance:
```
quarkus.datasource.jdbc.url=jdbc:postgresql://my.host-1.com,my.host-2.com,my.host-3.com:5432/myDB?targetServerType=master&ssl=true&sslmode=verify-ca&sslcert=my-cert&sslkey=my-key&sslpassword=&sslrootcert=my-cert.crt
```

It would be great to be able to do the same with your PgClient by parsing the URI the same way

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.