Please implement simple failover scenario

Поиск
Список
Период
Сортировка
От Enrico Olivelli - Diennea
Тема Please implement simple failover scenario
Дата
Msg-id ADD972C51196844491C410BCD4146DCD60A99AA817@dnaexc01.diennea.lan
обсуждение исходный текст
Ответы Re: Please implement simple failover scenario
Список 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
Diennea -
Digital Marketing Solutions
http://www.diennea.com

 

 



Rimani aggiornato sul mondo dell’email marketing e del digital marketing: visita il nostro blog! http://blog.magnews.it

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Patch to allow setting schema/search_path in the connectionURL
Следующее
От: Enrico Olivelli - Diennea
Дата:
Сообщение: Disk buffering of resultsets