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 1m1r9E-00037I-JR for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jul 2021 14:06:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m1r9C-0007Ya-Uq for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jul 2021 14:06:30 +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 1m1r9C-0007YS-N6 for pgsql-hackers@lists.postgresql.org; Fri, 09 Jul 2021 14:06:30 +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 1m1r9A-0002ho-Mo for pgsql-hackers@postgresql.org; Fri, 09 Jul 2021 14:06:30 +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 169E6IFL2093119; Fri, 9 Jul 2021 10:06:18 -0400 From: Tom Lane To: Noah Misch cc: Alvaro Herrera , Michael Paquier , Jacob Champion , "pgsql-hackers@postgresql.org" , Daniel Gustafsson , info@cspug.cz Subject: Re: Preventing abort() and exit() calls in libpq In-reply-to: <20210709095952.GA2945708@rfd.leadboat.com> References: <202107021459.7c2dkzyg5lua@alvherre.pgsql> <819502.1625239217@sss.pgh.pa.us> <20210703001639.GB2374652@rfd.leadboat.com> <1231771.1625321413@sss.pgh.pa.us> <1233492.1625323559@sss.pgh.pa.us> <20210703214658.GA2421985@rfd.leadboat.com> <1288324.1625352260@sss.pgh.pa.us> <20210709095952.GA2945708@rfd.leadboat.com> Comments: In-reply-to Noah Misch message dated "Fri, 09 Jul 2021 02:59:52 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2093117.1625839578.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 09 Jul 2021 10:06:18 -0400 Message-ID: <2093118.1625839578@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Noah Misch writes: > On Sat, Jul 03, 2021 at 06:44:20PM -0400, Tom Lane wrote: >> That'd require buildfarm owner intervention, as well as intervention >> by users. Which seems like exporting our problems onto them. I'd >> really rather not go that way if we can avoid it. > I like that goal, though we'll have to see how difficult it proves. As = of > today, a GNU/Linux user building against static OpenLDAP will get a fail= ure, > right? That would export work onto that user, spuriously. As a former packager for Red Hat, my response would be "you're doing it wrong". Nobody on any Linux distro should *ever* statically link code from one package into code from another, because they are going to create untold pain for themselves when (not if) the first package is updated. So I flat out reject that as a valid use-case. It may be that that ethos is not so strongly baked-in on other platforms. But I'm content to wait and see if there are complaints before rescinding the automatic test; and if there are, I'd prefer to deal with it by just backing off to running the test on Linux only. > We'd get something like 95% of the value by running the test on one Wind= ows > buildfarm member and one non-Windows buildfarm member. True. But that just brings up the point that we aren't running the test at all on MSVC builds right now. I have no idea how to do that, do you? > ... A strategy not having either of those drawbacks would be to skip > the test if libpq.so contains a definition of libpq_unbind(). I assume you meant some OpenLDAP symbol? > If any other > dependency contains exit calls, we'd likewise probe for one symbol of th= at > library and skip the test if presence of that symbol reveals static link= ing. > (That's maintenance-prone in its own way, but a maintenance-free strateg= y has > not appeared.) I'm more worried about the risk of failing to detect problems at all, in case somebody fat-fingers things in a way that causes the test to be skipped everywhere. I'll keep that way in mind if we conclude that the existing way is unworkable, but so far I don't think it is. regards, tom lane