Re: libpq connection timeout mismanagement

2018-08-14 Thread Tom Lane
Fabien COELHO writes: >> 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 w

Re: libpq connection timeout mismanagement

2018-08-14 Thread Fabien COELHO
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€: acce

Re: libpq connection timeout mismanagement

2018-08-13 Thread Robert Haas
On Thu, Aug 9, 2018 at 11:23 AM, Tom Lane wrote: > The patch that taught libpq about allowing multiple target hosts > modified connectDBComplete() with the intent of making the > connect_timeout (if specified) apply per-host, not to the complete > connection attempt. It did not do a very good job

Re: libpq connection timeout mismanagement

2018-08-13 Thread Tom Lane
Fabien COELHO writes: > Patch does not "git apply", but is ok with "patch -p1". Compiles. Yeah, as far as I can tell, "git apply" is very intolerant. > The code suggests that timeout is always 2 or more > if (timeout < 2) timeout = 2; > but doc says "It is not recommended to use a timeout o

Re: libpq connection timeout mismanagement

2018-08-11 Thread Fabien COELHO
Hello Tom, The patch that taught libpq about allowing multiple target hosts modified connectDBComplete() with the intent of making the connect_timeout (if specified) apply per-host, not to the complete connection attempt. It did not do a very good job though, because the timeout only gets res

libpq connection timeout mismanagement

2018-08-09 Thread Tom Lane
The patch that taught libpq about allowing multiple target hosts modified connectDBComplete() with the intent of making the connect_timeout (if specified) apply per-host, not to the complete connection attempt. It did not do a very good job though, because the timeout only gets reset when connectD