Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fpcwd-0003Ma-PM for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Aug 2018 17:17:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fpcwb-0004Mo-Os for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Aug 2018 17:17:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fpcwb-0004Mh-Hs for pgsql-hackers@lists.postgresql.org; Tue, 14 Aug 2018 17:17:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fpcwY-0002Bv-Ar for pgsql-hackers@lists.postgresql.org; Tue, 14 Aug 2018 17:17:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w7EHHClQ005107; Tue, 14 Aug 2018 13:17:12 -0400 From: Tom Lane To: Fabien COELHO cc: PostgreSQL Developers Subject: Re: libpq connection timeout mismanagement In-reply-to: References: <5735.1533828184@sss.pgh.pa.us> <20525.1534180589@sss.pgh.pa.us> Comments: In-reply-to Fabien COELHO message dated "Tue, 14 Aug 2018 11:03:16 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <5105.1534267032.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 14 Aug 2018 13:17:12 -0400 Message-ID: <5106.1534267032@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 was silently ignored > So erroring out would be a good thing, and it could be done on a new > release. Perhaps. That should certainly be a separate patch, though, and it should cover everything not just connection_timeout (I see at least five parameters that are parsed with atoi() and nothing else). I'm still not excited, but feel free to send a patch. regards, tom lane