[HACKERS] Re: [doc fix] PG10: wroing description on connect_timeout whenmultiple hosts are specified

Поиск
Список
Период
Сортировка
От Tsunakawa, Takayuki
Тема [HACKERS] Re: [doc fix] PG10: wroing description on connect_timeout whenmultiple hosts are specified
Дата
Msg-id 0A3221C70F24FB45833433255569204D1F6F836E@G01JPEXMBYT05
обсуждение исходный текст
Ответ на [HACKERS] Re: [doc fix] PG10: wroing description on connect_timeout whenmultiple hosts are specified  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Список pgsql-hackers
From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Tsunakawa,> Takayuki
> Instead, I think we should fix the program to match the documented behavior.
> Otherwise, if the first database machine is down, libpq might wait for about
> 2 hours (depending on the OS's TCP keepalive setting), during which it tims
> out after connect_timeout and does not attempt to connect to other hosts.
> 
> I'll add this item in the PostgreSQL 10 Open Items.

Please use the attached patch to fix the problem.  I confirmed the success as follows:

$ add "post_auth_delay = 10" in postgresql.conf on host1
$ start database servers on host1 and host2
$ psql -h host1,host2 -p 5432,5433 -d "dbname=postgres connect_timeout=3"
(psql connected to host2 after 3 seconds, which I checked with \conninfo)

Regards
Takayuki Tsunakawa


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] Hash Functions
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternativehosts when some errors occur