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 1m1a7X-0006PR-3I for pgsql-bugs@arkaria.postgresql.org; Thu, 08 Jul 2021 19:55:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m1a7V-0003ZI-Uu for pgsql-bugs@arkaria.postgresql.org; Thu, 08 Jul 2021 19:55:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1a7V-0003ZA-OX for pgsql-bugs@lists.postgresql.org; Thu, 08 Jul 2021 19:55:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1a7P-00013p-Cs for pgsql-bugs@lists.postgresql.org; Thu, 08 Jul 2021 19:55:36 +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 168JtRKm2040198; Thu, 8 Jul 2021 15:55:27 -0400 From: Tom Lane To: Michael Paquier cc: Daniel Gustafsson , Adrian Ho , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17083: [PATCH] PostgreSQL fails to build with OpenLDAP 2.5.x In-reply-to: References: <17083-a19190d9591946a7@postgresql.org> <1666182.1625579201@sss.pgh.pa.us> <1677203.1625582865@sss.pgh.pa.us> <1860066.1625677051@sss.pgh.pa.us> <68D22062-EC78-47C5-BC46-EF2F77193E19@yesql.se> Comments: In-reply-to Michael Paquier message dated "Thu, 08 Jul 2021 17:04:54 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2040196.1625774127.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 08 Jul 2021 15:55:27 -0400 Message-ID: <2040197.1625774127@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > On Thu, Jul 08, 2021 at 09:53:11AM +0200, Daniel Gustafsson wrote: >> Couldn't we add a version check to find if we have < 2.5 or >=3D 2.5, a= nd adjust >> libs accordingly? Alternatively we could perhaps check for >> LDAP_API_FEATURE_X_OPENLDAP_REENTRANT which IIUC when set defines -llda= p to be >> reentrant. > Would you fetch the version number directly from the library? Yeah, that all sounds kind of fragile. On investigation it seems that libldap_r has been around basically forever. Even my second-oldest buildfarm animal prairiedog has got it (indeed libldap.dylib and libldap_r.dylib are symlinks to the same file on that platform ... hmm). My oldest animal gaur is irrelevant to this discussion, because we don't support --enable-thread-safety on it in the first place. That being the case, I think we might be okay just going with the solution in Adrian's last patch, ie use libldap_r if it's there and otherwise assume that libldap is thread-safe. It looks fairly unlikely that anyone will ever have an issue with that; while if we complicate the configure probe, we might be introducing new problems just from that. regards, tom lane