Re: Proposal: Implement failover on libpq connect level.

Поиск
Список
Период
Сортировка
От Victor Wagner
Тема Re: Proposal: Implement failover on libpq connect level.
Дата
Msg-id 20150819173448.GA4767@wagner.pp.ru
обсуждение исходный текст
Ответ на Re: Proposal: Implement failover on libpq connect level.  (Tatsuo Ishii <ishii@postgresql.org>)
Ответы Re: Proposal: Implement failover on libpq connect level.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2015.08.20 at 00:17:35 +0900, Tatsuo Ishii wrote:

> > But once connection is established, each client works with one
> > server (at least until communication failure occurs and it would call
> > PQreset. In this case it has to reprepare statements anyway).
> 
> One downside of this is, if one of the standby servers is not
> responding, every time clients will be blocked by the server before
> giving up the connection trial. This could last for hours (for

This shouldn't happen. My proposal was to connect all servers
simultaneously, and then use that connection which would be established
first closing other ones

Even if we wouldn't do so (to properly randomize server load or to be
compatible with jdbc), there is connection_timeout parameter, so 
client wouldn't seat and just wait for hours while system TCP/IP stack
trying to connect nonexistent server.


> example, the network cable is plugged out). I think round robin DNS is
> better because the DNS server will drop the entry corresponding broken

DNS server wouldn't drop anything unless explicitely told so (by
administrator or by some watchdog software which is able to talk
nsupdate protocol). 

And not everyone database owner has control on his own domain.

Moreover, DNS is distributed system with agressive caching. If our
system is not local, DNS records for non-existing server would be cached
by DNS servers of client's internet provider. 




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

Предыдущее
От: Qingqing Zhou
Дата:
Сообщение: Re: Our trial to TPC-DS but optimizer made unreasonable plan
Следующее
От: jacques klein
Дата:
Сообщение: Re: how to write/setup a C trigger function in a background worker