vertx-sql-client icon indicating copy to clipboard operation
vertx-sql-client copied to clipboard

Preferred server type connection factory

Open Rattenkrieg opened this issue 4 years ago • 4 comments

This PR introduces a way to specify required/preferred server type among multiple servers when several hosts provided to pool factory. Example:

PgPool.pool(Vertx.vertx(), List.of(primaryHostOptions, replica1HostOptions, replica2HostOptions), poolOptions.setServerRequirement(PREFER_REPLICA))

Similar functionality provided by pgjdbc via targetServerType and libpq via target_session_attrs.

  • [x] javadocs

Rattenkrieg avatar Nov 08 '21 15:11 Rattenkrieg

Hey @vietj any chance you could have a look?

Rattenkrieg avatar Nov 18 '21 12:11 Rattenkrieg

sure @Rattenkrieg

vietj avatar Nov 19 '21 09:11 vietj

the new server type and requirements are specific to PG and the selection code should be in vertx-pg-client instead of vertx-sql-client

vietj avatar Dec 06 '21 07:12 vietj

it seems that this specific mechanism should be used as a PgPool connection provider

vietj avatar Dec 06 '21 07:12 vietj