Re: libpq connection timeout mismanagement

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: libpq connection timeout mismanagement
Date: 2018-08-14 09:03:16
Message-ID: alpine.DEB.2.21.1808140909250.27691@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Tom,

>> connect_timeout=2.9 is accepted and considered as meaning 2.
>> connect_timeout=-10 or connect_timeout=two are also accepted and mean
>> forever. Probably thanks to "atoi".
>
> Right. As before, I'm not excited about rejecting trailing junk,
> considering we never did before.

My 0.02€: accepting trailing junk is just a recipee for hiding bugs:

sh> psql "connect_timeout=2,port=5433"
psql> \conninfo
... port=5432 # port directive was silently ignored

So erroring out would be a good thing, and it could be done on a new
release. At the minimum there should be a warning.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2018-08-14 09:04:42 Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept
Previous Message Andres Freund 2018-08-14 07:04:54 Re: Alter index rename concurrently to