Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

jdbc.url pointing to multiple DB servers.

Stephen Schmidt May 2, 2015

What does the jdbc.url string need to look like if I want to point at multiple PostgreSQL servers (hot-standby configuration)?

1 answer

0 votes
Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 4, 2015

I don't think will change the URL of the different servers hosting the databases. You will need to create your own scripts for that.

Stephen Schmidt May 5, 2015

Not sure why that should be the case based on this: Source: https://jdbc.postgresql.org/documentation/head/connect.html Connection Fail-over To support simple connection fail-over it is possible to define multiple endpoints (host and port pairs) in the connection url separated by commas. The driver will try to once connect to each of them in order until the connection succeeds. If none succeed, a normal connection exception is thrown. The syntax for the connection url is: jdbc:postgresql://host1:port1,host2:port2/database The simple connection fail-over is useful when running against a high availability postgres installation that has identical data on each node. For example streaming replication postgres or postgres-xc cluster.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events