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 1siy5f-00Bw2J-1h for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Aug 2024 15:26:39 +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 1siy5c-008i4Y-L2 for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Aug 2024 15:26:37 +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 1siy5c-008i4Q-6B for pgsql-hackers@lists.postgresql.org; Tue, 27 Aug 2024 15:26:36 +0000 Received: from pb-smtp21.pobox.com ([173.228.157.53]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1siy5Y-001m6L-Fv for pgsql-hackers@postgresql.org; Tue, 27 Aug 2024 15:26:35 +0000 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 356C7259D9; Tue, 27 Aug 2024 11:26:32 -0400 (EDT) (envelope-from david@justatheory.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=sasl; bh= rkMvf4gvH1Ylwknl4HeFl4OhL4MdzAXlCtL2b5loB0A=; b=w4ReRqRbebpDqJbB iPVKhOTtcsKYSYtMiXOmeEu/9QB9vB8jz2gC7p0Qioj9GsOBejj9GkgfLxqvdNjH /nR4xI/uu52mwG9XnuCmfqsFLbcPOITZY8qa/gDScH5VosrwjW+7aFpOeecqpDEC NJc+TYIfv6qooqjniDFSDOTvvPY= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 2E608259D8; Tue, 27 Aug 2024 11:26:32 -0400 (EDT) (envelope-from david@justatheory.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=justatheory.com; h=content-type:mime-version:subject:from:in-reply-to:date:cc:content-transfer-encoding:message-id:references:to; s=2016-12.pbsmtp; bh=rkMvf4gvH1Ylwknl4HeFl4OhL4MdzAXlCtL2b5loB0A=; b=ITm7jlBiE9ZP+vfvjMmK6+pXXyJS9gWNC3kdB6ZBuRGztiqJ9eTdw+xnmP984GCwxxrRtCigPjpjO42p3q3x5lwWzUSIOaMW+0ZOa4acrvAKOOIJL3CK8YQ2dsY7wCUB/fx7f0juQRVF9Q0mnreap7RHEQ7cgY8JivGzvOIEB08= Received: from smtpclient.apple (unknown [158.222.197.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id EC4FA259D7; Tue, 27 Aug 2024 11:26:27 -0400 (EDT) (envelope-from david@justatheory.com) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: RFC: Additional Directory for Extensions From: "David E. Wheeler" In-Reply-To: Date: Tue, 27 Aug 2024 11:26:15 -0400 Cc: Gabriele Bartolini , Robert Haas , Alvaro Herrera , PostgreSQL-development Content-Transfer-Encoding: quoted-printable Message-Id: References: <202406251012.brdp2dobkf7n@alvherre.pgsql> To: Craig Ringer X-Mailer: Apple Mail (2.3776.700.51) X-Pobox-Relay-ID: BADCAA4E-6488-11EF-8751-E92ED1CD468F-76319746!pb-smtp21.pobox.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Aug 26, 2024, at 17:35, Craig Ringer = wrote: > This looks like a good suggestion to me, it would make the packaging, > distribution and integration of 3rd party extensions significantly > easier without any obvious large or long term cost. Yes! > Also PGXS, the windows extension build support, and 3rd party cmake > builds etc. But not by the looks a drastic change. Right. ISTM it could complicate PGXS quite a bit. If we set, say,=20 SET extension_search_path =3D $extsdir, /mnt/extensions/pg16, = /mnt/extensions/pg16/gosuperfast/extensions; What should be the output of `pg_config --sharedir`? > My only real concern with the current patch is that it limits > searching for extensions to one additional configurable location, > which is inconsistent with how things like the dynamic_library_path > works. Once in, it'll be difficult to change or extend for BC, and if > someone wants to add a search path capability it'll break existing > configurations. Agreed. > Would it be feasible to define its configuration syntax as accepting a > list of paths, but only implement the semantics for single-entry lists > and ERROR on multiple paths? That way it could be extended w/o > breaking existing configurations later. I imagine it=E2=80=99s a simple matter of programming :-) But that = leaves the issue of directory organization. The current patch is just a = prefix for various PGXS/pg_config directories; the longer-term proposal = I=E2=80=99ve made here is not a prefix for sharedir, mandir, etc., but a = directory that contains directories named for extensions. So even if we = were to take this approach, the directory structure would vary. I suspect we=E2=80=99d have to name it differently and support both = long-term. That, too me, is the main issue with this patch. OTOH, we have this patch now, and this other stuff is just a proposal. = Actual code trumps ideas in my mind. > With that said, I'm not the one doing the work at the moment, and the > functionality would definitely be helpful. If there's agreement on > supporting a search-path or recursing into subdirectories I'd be > willing to have a go at it, but I'm a bit stale on Pg's codebase now > so I'd want to be fairly confident the work wouldn't just be thrown > out. I think we should get some clarity on the proposal, and then consensus, = as you say. I say =E2=80=9Cget some clarity=E2=80=9D because my proposal = doesn=E2=80=99t require recursing, and I=E2=80=99m not sure why it=E2=80=99= d be needed. Best, David