Re: libpq: Fix wrong connection status on invalid "connect_timeout"

Поиск
Список
Период
Сортировка
От Lars Kanis
Тема Re: libpq: Fix wrong connection status on invalid "connect_timeout"
Дата
Msg-id a5d30d9b-ccac-4147-0835-c4a3e789fc9a@greiz-reinsdorf.de
обсуждение исходный текст
Ответ на libpq: Fix wrong connection status on invalid "connect_timeout"  (Lars Kanis <lars@greiz-reinsdorf.de>)
Ответы Re: libpq: Fix wrong connection status on invalid "connect_timeout"  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
I verified that all other integer parameters properly set CONNECTION_BAD
in case of invalid values. These are:

* port
* keepalives_idle
* keepalives_interval
* keepalives_count
* tcp_user_timeout

That's why I changed connectDBComplete() only, instead of setting the
status directly in parse_int_param().

--

Kind Regards,
Lars Kanis


Am 17.10.19 um 20:04 schrieb Lars Kanis:
> Greetings,
>
> libpq since PostgreSQL-12 has stricter checks for integer values in
> connection parameters. They were introduced by commit
> https://github.com/postgres/postgres/commit/e7a2217978d9cbb2149bfcb4ef1e45716cfcbefb
> .
>
> However in case of "connect_timeout" such an invalid integer value leads
> to a connection status other than CONNECTION_OK or CONNECTION_BAD. The
> wrong parameter is therefore not properly reported to user space. This
> patch fixes this by explicit setting CONNECTION_BAD.
>
> The issue was raised on ruby-pg: https://github.com/ged/ruby-pg/issues/302
>
> It originally came up at Heroku:
> https://github.com/heroku/stack-images/issues/147
>
--
--
Kind Regards,
Lars Kanis





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

Предыдущее
От: Lars Kanis
Дата:
Сообщение: libpq: Fix wrong connection status on invalid "connect_timeout"
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: ICU for global collation