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

From: Lars Kanis <lars(at)greiz-reinsdorf(dot)de>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: libpq: Fix wrong connection status on invalid "connect_timeout"
Date: 2019-10-17 20:10:17
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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
> .
> 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:
> It originally came up at Heroku:
Kind Regards,
Lars Kanis

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2019-10-17 21:43:06 Re: ICU for global collation
Previous Message Lars Kanis 2019-10-17 18:04:19 libpq: Fix wrong connection status on invalid "connect_timeout"