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 1tDgeZ-002WfR-UU for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Nov 2024 09:05:40 +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 1tDgeY-003qZx-Kx for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Nov 2024 09:05:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDgeY-003qZo-Ak for pgsql-hackers@lists.postgresql.org; Wed, 20 Nov 2024 09:05:38 +0000 Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDgeV-002qsS-Ng for pgsql-hackers@postgresql.org; Wed, 20 Nov 2024 09:05:37 +0000 Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfout.phl.internal (Postfix) with ESMTP id E44DB138074E; Wed, 20 Nov 2024 04:05:34 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Wed, 20 Nov 2024 04:05:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm3; t=1732093534; x=1732179934; bh=3LNBPVOPZA/TgLyH6tNnJECOK1lGrkAC Z79YRed0P6A=; b=ccFZafv9n3+xmu4zKVfnKgBbXrEIsO369C8hMKeYem+oh14+ NpQtTq5qO/QBKnEuBdHqUfWOnzV4VA45s8pFmVsnxK4bpTKKr66A2Jy2NHSN2pfo /hgXUq6HxSA2UpluezItmQvRvxFIpvDxOfR2KtjqaxRmTwTN7mw4p+JCaEbVMR8x U9EZXZDFyVgCFPzbX49ZModzHUbmTqyiYFVvl6eaKyMLLxXaDSGlgjD6duoyT+Mw EVGlR9a8/sW//yqQL9qA18WoVkZM2R/lbP/VQv3Wc4ZvK9yDogFgLAFw7uerxooQ Kneh7W1t4/MOfA37VLMF6aUyVAPaciBENtKuPA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1732093534; x= 1732179934; bh=3LNBPVOPZA/TgLyH6tNnJECOK1lGrkACZ79YRed0P6A=; b=r RTMxZO2ULMI5ZKt8slL9YNCoQq1czzNYe+J8YKP58o4LdegHY1W3HK6cEJAyxDVj cERsYavC+3LCWRoZ7KTQ7HZlXTcXX/zaCZ4W7nWZTtThmuEylChMP9UzTkgUY7EX SM+cumt0S6JmDDC2jkdeo0LMvGk1xzVaSIPFW0k4bgUM8C8F72wA5NKnMemPQBLW LA1ADkq0hEVN2AnvEbUw7HmGasAgxN8psHiVO6J+8jEHWQlRAwcLBUsmvKaidRxp FfIggqC9gvPRmfThlzL2UOACES7VEdLSI7HZzkxYhEvk9tLdzJ6L5NQfPvv+htoO 4ueYNxUMRfXNGfEhE/nCA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfeefgdduvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpefrvghtvghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvg hnthhrrghuthdrohhrgheqnecuggftrfgrthhtvghrnhepgfejtdfhkeeftdeugfeileeh teeljeeghfeuledthfeutedvffdukeefjefhgeehnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhesvghishgvnhhtrhgruhhtrdho rhhgpdhnsggprhgtphhtthhopeeipdhmohguvgepshhmthhpohhuthdprhgtphhtthhope gurghvihgusehjuhhsthgrthhhvghorhihrdgtohhmpdhrtghpthhtoheptghrrghighdr rhhinhhgvghrsegvnhhtvghrphhrihhsvggusgdrtghomhdprhgtphhtthhopehgrggsrh hivghlvgdrsggrrhhtohhlihhnihesvghnthgvrhhprhhishgvuggsrdgtohhmpdhrtghp thhtoheprhhosggvrhhtmhhhrggrshesghhmrghilhdrtghomhdprhgtphhtthhopegrlh hvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhrtghpthhtohepphhgshhqlhdq hhgrtghkvghrshesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Nov 2024 04:05:33 -0500 (EST) Message-ID: <4baa596e-f6f3-4619-96ad-26382f6986a3@eisentraut.org> Date: Wed, 20 Nov 2024 10:05:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: RFC: Additional Directory for Extensions To: "David E. Wheeler" Cc: Craig Ringer , Gabriele Bartolini , Robert Haas , Alvaro Herrera , PostgreSQL-development References: <0d384836-7e6e-4932-af3b-8dad1f6fee43@eisentraut.org> <0D89C6B2-F294-4389-9DDA-07C381995292@justatheory.com> <04235387-120e-4bf6-b5c8-645d869222b9@eisentraut.org> <3AA66D08-D3C1-409E-A120-721ACF923EC6@justatheory.com> Content-Language: en-US From: Peter Eisentraut In-Reply-To: <3AA66D08-D3C1-409E-A120-721ACF923EC6@justatheory.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 18.11.24 20:19, David E. Wheeler wrote: >>>>> - The biggest problem is that many extensions set in their control file >>>>> >>>>> module_pathname = '$libdir/foo' >>>>> >>>>> This disables the use of dynamic_library_path, so this whole idea of installing an extension elsewhere won't work that way. The obvious solution is that extensions change this to just 'foo'. But this will require a lot updating work for many extensions, or a lot of patching by packagers. >> >> Yeah, '$libdir/foo' has been the documented way to do it for quite some time, as I recall. Perhaps the behavior of the MODULE_PATHNAME replacement function could be changed to omit $libdir when writing the SQL files? > > Elsewhere you write: > >> Nothing changes about shared library files. They are looked up in dynamic_library_path or any hardcoded file name. > > And also point out that the way to install them is: > > ``` > make install datadir=/else/where/share pkglibdir=/else/where/lib > ``` > > So as long as dynamic_library_path includes /else/where/lib it should work, just as before, no? The path is only consulted if the specified name does not contain a slash. So if you do LOAD 'foo', the path is consulted, but if you do LOAD '$libdir/foo', it is not. The problem I'm describing is that most extensions use the latter style, per current recommendation in the documentation.