Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHzkP-0000KE-VI for pgsql-bugs@arkaria.postgresql.org; Thu, 10 Feb 2022 03:03:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nHzkO-0007xR-Hf for pgsql-bugs@arkaria.postgresql.org; Thu, 10 Feb 2022 03:03:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHzkO-0007xI-9S for pgsql-bugs@lists.postgresql.org; Thu, 10 Feb 2022 03:03:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHzkL-00074J-Ow for pgsql-bugs@lists.postgresql.org; Thu, 10 Feb 2022 03:03:51 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 21A33YsO1537891; Wed, 9 Feb 2022 22:03:34 -0500 From: Tom Lane To: Daniel Gustafsson cc: Thomas Munro , Andres Freund , byavuz81@gmail.com, PostgreSQL mailing lists , Heikki Linnakangas , Michael Paquier Subject: Re: BUG #17391: While using --with-ssl=openssl and PG_TEST_EXTRA='ssl' options, SSL tests fail on OpenBSD 7.0 In-reply-to: References: <17391-304f81bcf724b58b@postgresql.org> <20220202213900.h7paogmcge2rtls6@alap3.anarazel.de> <131329.1643851912@sss.pgh.pa.us> <203742.1643866877@sss.pgh.pa.us> <887CBA28-0942-4084-BE09-FBE0D6A1DB53@yesql.se> <621771.1644098845@sss.pgh.pa.us> <635760.1644108785@sss.pgh.pa.us> <1113966.1644280235@sss.pgh.pa.us> Comments: In-reply-to Daniel Gustafsson message dated "Tue, 08 Feb 2022 16:28:36 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1537889.1644462214.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 09 Feb 2022 22:03:34 -0500 Message-ID: <1537890.1644462214@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Daniel Gustafsson writes: > On 8 Feb 2022, at 01:30, Tom Lane wrote: >> ..could we get away with ignoring EPIPE/ECONNRESET in writes during con= nection >> startup? We'd notice the failure soon enough on the read side if it's = not this >> problem. (This seems a bit related to libpq's other hacks that postpon= e >> recognition of write failures.) > Off the cuff I can't think of a case where it would lead to adverse effe= cts > *during startup*. Just to note that I have a plan for fixing this part. I've concluded that it was a design error to implement the write_failed error postponement mechanism in pqSendSome, and instead we should shove it down a couple of abstraction layers into pqsecure_raw_write. This'd visibly have no effect on non-encrypted connections, because pqSendSome is the only caller of pqsecure_write. But in encrypted connections, we'd be additionally allowing write-failure postponement during OpenSSL's internal machinations, which seems to be exactly what's wanted now that we have seen this failure mode. There are some details to work through, but I hope to have a patch soon. regards, tom lane