Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rp8zz-005I1v-5i for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Mar 2024 15:46:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rp8zy-00HZct-5w for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Mar 2024 15:46:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rp8zx-00HZc0-TA for pgsql-bugs@lists.postgresql.org; Tue, 26 Mar 2024 15:46:01 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rp8zv-006bcz-DQ for pgsql-bugs@lists.postgresql.org; Tue, 26 Mar 2024 15:46:01 +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 42QFjth12901435; Tue, 26 Mar 2024 11:45:55 -0400 From: Tom Lane To: Peter Eisentraut cc: Thomas Munro , Bruce Momjian , walther@technowledgy.de, Christophe Pettus , Andrew Dunstan , PostgreSQL Bugs , Robert Haas Subject: Re: Regression tests fail with musl libc because libpq.so can't be loaded In-reply-to: <515199be-2f4d-4e47-9b6e-d3f3ed11e510@eisentraut.org> References: <477fa513-6bf0-456d-8d24-1e22a19df671@technowledgy.de> <36690fcf-f0c8-4d60-af49-6a7efa0e2b14@technowledgy.de> <443430b4-0c10-49f3-8c8a-e5e76602f309@eisentraut.org> <2712381.1711408552@sss.pgh.pa.us> <2715727.1711410188@sss.pgh.pa.us> <515199be-2f4d-4e47-9b6e-d3f3ed11e510@eisentraut.org> Comments: In-reply-to Peter Eisentraut message dated "Tue, 26 Mar 2024 08:19:09 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2901433.1711467955.1@sss.pgh.pa.us> Date: Tue, 26 Mar 2024 11:45:55 -0400 Message-ID: <2901434.1711467955@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut writes: > On 26.03.24 00:43, Tom Lane wrote: >> I looked at the musl source code you identified and confirmed that >> only the LD_LIBRARY_PATH string is remembered in a static variable; >> LD_PRELOAD is only accessed locally in that initialization function. >> So we only need to do the attached. (I failed to resist the >> temptation to rewrite the comments.) > Yeah, I was more looking for a comment for posterity for *why* we need > to preserve this variable in particular. The updated comment looks > reasonable. OK, pushed after a bit more comment-fiddling. regards, tom lane