From: | Enrico Olivelli - Diennea <enrico(dot)olivelli(at)diennea(dot)com> |
---|---|
To: | "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Please implement simple failover scenario |
Date: | 2014-09-19 10:38:44 |
Message-ID: | ADD972C51196844491C410BCD4146DCD60A99AA817@dnaexc01.diennea.lan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi,
we are going to switch from Oracle to PostgreSQL and we would like to setup a simple hot-standby/warm-standby replication scenario.
Actually your JDBC driver does not have native support for failover to the slave host.
We are interestend in this scenario in order to implement the warm-standby case:
Case 1: WARM-STANDBY (slave is not accepting connections)
JDBC configuration: use URL1 on getConnection....and URL2 as failover
Step of "getConnection":
1) Connect to URL1
2) Connection OK --> proceed with URL1
3) Connection FAILED --> proceed with URL2
Case 2: HOT-STANDBY (slave is accepting connections)
In order to implement the hot-standby we need to configure a query on getConnection in order to ask to the server if actually it is the actual "master"
1) Connect to URL1
2) Connection OK
a. Ask "Are you the master?"
b. Yes --> proceed with URL1
c. No --> proceed with URL2
3) Connection FAILED
a. proceed with URL2
I known that this implementation is really "skinny" and some more advanced features are needed for more complete setups but this is what we need
We can contribute with some patch
Enrico Olivelli
Software Development Manager @Diennea
Tel.: (+39) 0546 066100 - Int. 925
Viale G.Marconi 30/14 - 48018 Faenza (RA)
MagNews - E-mail Marketing Solutions
http://www.magnews.it<http://www.magnews.it/>
Diennea - Digital Marketing Solutions
http://www.diennea.com<http://www.diennea.com/>
________________________________
Rimani aggiornato sul mondo dell'email marketing e del digital marketing: visita il nostro blog! http://blog.magnews.it
From | Date | Subject | |
---|---|---|---|
Next Message | Enrico Olivelli - Diennea | 2014-09-19 10:44:43 | Disk buffering of resultsets |
Previous Message | Alexis Meneses | 2014-09-19 07:38:36 | Re: Patch to allow setting schema/search_path in the connectionURL |