Re: [JDBC] Multiple databases? - Mailing list pgsql-jdbc

From Turbo Fredriksson
Subject Re: [JDBC] Multiple databases?
Date
Msg-id 654BDB5C-0D86-49CA-BA6B-5A53A8F74EC0@bayour.com
Whole thread Raw
In response to Re: [JDBC] Multiple databases?  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Responses Re: [JDBC] Multiple databases?
List pgsql-jdbc
On 15 Sep 2017, at 07:55, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:

> 1) pgjdbc is configured with a full set of connection URLs, targetServerType=master  (default value is "any”)

Ok, so it uses a connection pool (c3p0) and he managed to figure out this
config line on his machine (that only have a ONE local PGSQL):
jdbc:postgresql://localhost,server2,server3/fc?targetServerType=master

It connected just fine to his local server AND tried server2 and server3 if he
shut that down.


HOWEVER, that doesn’t solve my problem with load balancing :(.


So my my question is still, if I give it
jdbc:postgresql://round-robin/fc?targetServerType=master

where ‘round-robin’ is a DNS round-robin entry for ALL the servers,
master AND all the replicas, will this still work?

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: [JDBC] Multiple databases?
Next
From: Turbo Fredriksson
Date:
Subject: Re: [JDBC] Multiple databases?