[HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts whensome errors occur

Поиск
Список
Период
Сортировка
От Tsunakawa, Takayuki
Тема [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts whensome errors occur
Дата
Msg-id 0A3221C70F24FB45833433255569204D1F6F5659@G01JPEXMBYT05
обсуждение исходный текст
Ответы Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternativehosts when some errors occur  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
Hello,

I found a problem with libpq connection failover.  When libpq cannot connect to earlier hosts in the host list, it
doesn'ttry to connect to other hosts.  For example, when you specify a wrong port that some non-postgres program is
using,or some non-postgres program is using PG's port unexpectedly, you get an error like this:
 

$ psql -h localhost -p 23
psql: received invalid response to SSL negotiation: 
$ psql -h localhost -p 23 -d "sslmode=disable"
psql: expected authentication request from server, but received 

Likewise, when the first host has already reached max_connections, libpq doesn't attempt the connection aginst later
hosts.

The attached patch fixes this.  I'll add this item in the PostgreSQL 10 Open Items.


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 по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: [HACKERS] Hash Functions
Следующее
От: Masahiko Sawada
Дата:
Сообщение: [HACKERS] Improvement in log message of logical replication worker