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 1sQqom-00BwYv-GD for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jul 2024 16:02:20 +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 1sQqok-006viO-PY for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jul 2024 16:02:18 +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 1sQqok-006viA-39 for pgsql-hackers@lists.postgresql.org; Mon, 08 Jul 2024 16:02:18 +0000 Received: from pb-smtp2.pobox.com ([64.147.108.71]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sQqof-0014VS-HN for pgsql-hackers@postgresql.org; Mon, 08 Jul 2024 16:02:16 +0000 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 73D1721856; Mon, 8 Jul 2024 12:02:10 -0400 (EDT) (envelope-from david@justatheory.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from :message-id:content-type:mime-version:subject:date:in-reply-to :cc:to:references; s=sasl; bh=ORvtotK+w55omvlLRVMO2zqIuX8uORGDKi Vlv2iA85Q=; b=gxz2vBhO/pYSv2sQKQNd0uiRQZl4ZhEJ0a05wAR8sC3wf7cMGD nclCzAmr0+JOAf45Be4AqmgopomqiJFwzM0nCr6AH6j7uv2O31OXrzfOuLKDHaDN YytOoQhWgaTXMb1Yh0rdmlTRc0H19DlmM5u6XK/JGpAYEvK5XY101e+GU= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 6B6D221855; Mon, 8 Jul 2024 12:02:10 -0400 (EDT) (envelope-from david@justatheory.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=justatheory.com; h=from:message-id:content-type:mime-version:subject:date:in-reply-to:cc:to:references; s=2016-12.pbsmtp; bh=ORvtotK+w55omvlLRVMO2zqIuX8uORGDKiVlv2iA85Q=; b=GXlLNoExk4PcuFS4R0rmplPiWhPYaDeZXec1Q88F3RVLtjqg9DjlYvSUZorrBIs8j2lKpcLtBSwo2ZlUOuc2LO5BpODCMBU4UFnYSU8R8jgrp10j9g/aLs7G3sCh4tEycBH9TfvaHLj7uUhRGe5T5xIPxrTYv+ZwsxdoH6WadCA= 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-smtp2.pobox.com (Postfix) with ESMTPSA id 9D00C21854; Mon, 8 Jul 2024 12:02:09 -0400 (EDT) (envelope-from david@justatheory.com) From: "David E. Wheeler" Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_AE33153C-2A96-48DD-B05D-3C56377210F1" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: RFC: Additional Directory for Extensions Date: Mon, 8 Jul 2024 12:01:57 -0400 In-Reply-To: Cc: Alvaro Herrera , PostgreSQL-development To: Robert Haas References: <202406251012.brdp2dobkf7n@alvherre.pgsql> X-Mailer: Apple Mail (2.3774.600.62) X-Pobox-Relay-ID: 6E7A3C96-3D43-11EF-BCFA-965B910A682E-76319746!pb-smtp2.pobox.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_AE33153C-2A96-48DD-B05D-3C56377210F1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Jun 25, 2024, at 18:31, David E. Wheeler = wrote: > For those who prefer a GitHub patch review experience, see this PR: >=20 > https://github.com/theory/postgres/pull/3/files Rebased and restored PGC_SUSET in the attached v5 patch, plus noted the = required privileges in the docs. Best, David --Apple-Mail=_AE33153C-2A96-48DD-B05D-3C56377210F1 Content-Disposition: attachment; filename=v5-0001-Add-extension_destdir-GUC.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="v5-0001-Add-extension_destdir-GUC.patch" Content-Transfer-Encoding: quoted-printable =46rom=20c1a146b18187fa1ba96000815aab0a574e0110f2=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20"David=20E.=20Wheeler"=20= =0ADate:=20Mon,=208=20Jul=202024=2011:58:45=20= -0400=0ASubject:=20[PATCH=20v5]=20Add=20extension_destdir=20GUC=0A=0A= Based=20on=20a=20[patch]=20by=20Christophe=20Berg=20in=20the=20Debian=20= Project,=20add=20a=20new=0AGUC,=20`extension_destdir`,=20that=20prepends=20= a=20directory=20prefix=20for=20extension=0Aloading.=20This=20directory=20= is=20prepended=20to=20the=20`SHAREDIR`=20paths=20when=0Aloading=20= extensions=20(control=20and=20SQL=20files),=20and=20to=20the=20`$libdir`=0A= directive=20when=20loading=20modules=20that=20back=20functions.=20= Requires=20a=20superuser=0Aor=20user=20with=20the=20appropriate=20SET=20= privilege.=0A=0AAlso=20document=20the=20PGXS=20`DESTDIR`=20variable,=20= which=20should=20be=20used=20to=0Ainstall=20extensions=20into=20the=20= proper=20destination=20directory.=0A=0A=20=20[patch]:=20= https://salsa.debian.org/postgresql/postgresql/-/blob/17/debian/patches/ex= tension_destdir?ref_type=3Dheads=0A---=0A=20doc/src/sgml/config.sgml=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=2037=20= ++++++++=0A=20doc/src/sgml/extend.sgml=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20|=2012=20++-=0A=20= src/backend/commands/extension.c=20=20=20=20=20=20=20=20=20=20=20=20=20=20= |=2090=20+++++++++++++++++++=0A=20src/backend/utils/fmgr/dfmgr.c=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20|=2029=20+++++-=0A=20= src/backend/utils/misc/guc_tables.c=20=20=20=20=20=20=20=20=20=20=20|=20= 12=20+++=0A=20src/backend/utils/misc/postgresql.conf.sample=20|=20=202=20= +=0A=20src/include/utils/guc.h=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20|=20=201=20+=0A=207=20files=20changed,=20181=20= insertions(+),=202=20deletions(-)=0A=0Adiff=20--git=20= a/doc/src/sgml/config.sgml=20b/doc/src/sgml/config.sgml=0Aindex=20= f627a3e63c..defe218007=20100644=0A---=20a/doc/src/sgml/config.sgml=0A+++=20= b/doc/src/sgml/config.sgml=0A@@=20-10389,6=20+10389,43=20@@=20= dynamic_library_path=20=3D=20= 'C:\tools\postgresql;H:\my_project\lib;$libdir'=0A=20=20=20=20=20=20=20= =0A=20=20=20=20=20=20=0A=20=0A+=20=20=20=20=20= =0A+=20=20=20=20=20=20= extension_destdir=20(string)=0A+=20= =20=20=20=20=20=0A+=20=20=20=20=20=20=20= extension_destdir=20configuration=20= parameter=0A+=20=20=20=20=20=20=0A+=20=20=20=20=20=20= =0A+=20=20=20=20=20=20=0A+=20=20=20=20=20=20=20=0A= +=20=20=20=20=20=20=20=20Specifies=20a=20directory=20prefix=20into=20= which=20extensions=20should=20be=0A+=20=20=20=20=20=20=20=20installed.=20= Only=20superusers=20and=20users=20with=20the=20appropriate=0A+=20=20=20=20= =20=20=20=20SET=20privilege=20can=20change=20this=20= setting.=20When=20set,=0A+=20=20=20=20=20=20=20=20the=20postmaster=20= will=20search=20this=20directory=20for=20an=20extension=20before=0A+=20=20= =20=20=20=20=20=20searching=20the=20default=20paths.=0A+=20=20=20=20=20=20= =20=0A+=0A+=20=20=20=20=20=20=20=0A+=20=20=20=20=20=20=20=20= For=20example,=20this=20configuration:=0A+=0A= +extension_destdir=20=3D=20'/mnt/extensions'=0A+=0A+=20=20= =20=20=20=20=20=20will=20allow=20PostgreSQL=20= to=20first=20look=20for=0A+=20=20=20=20=20=20=20=20extension=20control=20= files,=20SQL=20files,=20and=20loadable=20modules=20installed=20in=0A+=20=20= =20=20=20=20=20=20/mnt/extensions=20and=20fall=20back=20= on=20the=0A+=20=20=20=20=20=20=20=20default=20directories=20if=20they're=20= not=20found=20there.=0A+=20=20=20=20=20=20=20=0A+=0A+=20=20=20=20=20= =20=20=0A+=20=20=20=20=20=20=20=20Note=20that=20the=20files=20= should=20be=20installed=20in=20their=20full=20paths=20under=20the=0A+=20=20= =20=20=20=20=20=20extension_destdir=20prefix.=20When=20= using=0A+=20=20=20=20=20=20=20=20PGXS=20to=20install=20an=20extension,=20= pass=0A+=20=20=20=20=20=20=20=20the=20destination=20directory=20via=20= the=20DESTDIR=20variable=0A+=20=20=20=20=20=20=20=20= to=20install=20the=20files=20in=20the=20proper=20location.=20For=20more=20= information=20see=0A+=20=20=20=20=20=20=20=20.=0A+=20=20=20=20=20=20=20= =0A+=20=20=20=20=20=20=0A+=20=20=20=20=20= =0A+=0A=20=20=20=20=20=20=0A=20=20=20=20=20= =0A=20=20=20=20=0Adiff=20--git=20= a/doc/src/sgml/extend.sgml=20b/doc/src/sgml/extend.sgml=0Aindex=20= 218940ee5c..6653955d53=20100644=0A---=20a/doc/src/sgml/extend.sgml=0A+++=20= b/doc/src/sgml/extend.sgml=0A@@=20-669,7=20+669,8=20@@=20RETURNS=20= anycompatible=20AS=20...=0A=20=20=20=20=20=20=20=20=0A=20=20=20=20=20= =20=20=20=20The=20directory=20containing=20the=20extension's=20= SQL=20script=0A=20=20=20=20=20=20=20=20=20file(s).=20=20= Unless=20an=20absolute=20path=20is=20given,=20the=20name=20is=20relative=20= to=0A-=20=20=20=20=20=20=20=20the=20installation's=20= SHAREDIR=20directory.=20=20The=0A+=20=20=20=20=20=20=20= =20the=20SHAREDIR=20under=20the=20=0A+=20=20=20=20=20=20=20=20prefix=20= and=20to=20the=20installation's=20SHAREDIR=20= directory.=20=20The=0A=20=20=20=20=20=20=20=20=20default=20behavior=20is=20= equivalent=20to=20specifying=0A=20=20=20=20=20=20=20=20=20= directory=20=3D=20'extension'.=0A=20=20=20=20=20=20=20= =20=0A@@=20-1710,6=20+1711,15=20@@=20include=20$(PGXS)=0A=20=20=20= =20=20=20=20=0A=20=20=20=20=20=20=0A=20=0A+=20=20= =20=20=20=0A+=20=20=20=20=20=20= DESTDIR=0A+=20=20=20=20=20=20=0A= +=20=20=20=20=20=20=20=0A+=20=20=20=20=20=20=20=20install=20all=20= files=20under=20this=20directory=20prefix=0A+=20=20=20=20=20=20=20= =0A+=20=20=20=20=20=20=0A+=20=20=20=20=20= =0A+=0A=20=20=20=20=20=20=0A=20=20=20=20=20=20=20= NO_INSTALLCHECK=0A=20=20=20=20=20=20=20= =0Adiff=20--git=20a/src/backend/commands/extension.c=20= b/src/backend/commands/extension.c=0Aindex=201643c8c69a..f3b7735c5b=20= 100644=0A---=20a/src/backend/commands/extension.c=0A+++=20= b/src/backend/commands/extension.c=0A@@=20-393,6=20+393,16=20@@=20= get_extension_control_filename(const=20char=20*extname)=0A=20=0A=20=09= get_share_path(my_exec_path,=20sharepath);=0A=20=09result=20=3D=20(char=20= *)=20palloc(MAXPGPATH);=0A+=09/*=0A+=09=20*=20If=20extension_destdir=20= is=20set,=20try=20to=20find=20the=20file=20there=20first=0A+=09=20*/=0A+=09= if=20(*extension_destdir=20!=3D=20'\0')=0A+=09{=0A+=09=09= snprintf(result,=20MAXPGPATH,=20"%s%s/extension/%s.control",=0A+=09=09=09= =09=20extension_destdir,=20sharepath,=20extname);=0A+=09=09if=20= (pg_file_exists(result))=0A+=09=09=09return=20result;=0A+=09}=0A=20=09= snprintf(result,=20MAXPGPATH,=20"%s/extension/%s.control",=0A=20=09=09=09= =20sharepath,=20extname);=0A=20=0A@@=20-432,6=20+442,16=20@@=20= get_extension_aux_control_filename(ExtensionControlFile=20*control,=0A=20= =09scriptdir=20=3D=20get_extension_script_directory(control);=0A=20=0A=20= =09result=20=3D=20(char=20*)=20palloc(MAXPGPATH);=0A+=09/*=0A+=09=20*=20= If=20extension_destdir=20is=20set,=20try=20to=20find=20the=20file=20= there=20first=0A+=09=20*/=0A+=09if=20(*extension_destdir=20!=3D=20'\0')=0A= +=09{=0A+=09=09snprintf(result,=20MAXPGPATH,=20"%s%s/%s--%s.control",=0A= +=09=09=09=09=20extension_destdir,=20scriptdir,=20control->name,=20= version);=0A+=09=09if=20(pg_file_exists(result))=0A+=09=09=09return=20= result;=0A+=09}=0A=20=09snprintf(result,=20MAXPGPATH,=20= "%s/%s--%s.control",=0A=20=09=09=09=20scriptdir,=20control->name,=20= version);=0A=20=0A@@=20-450,6=20+470,23=20@@=20= get_extension_script_filename(ExtensionControlFile=20*control,=0A=20=09= scriptdir=20=3D=20get_extension_script_directory(control);=0A=20=0A=20=09= result=20=3D=20(char=20*)=20palloc(MAXPGPATH);=0A+=09/*=0A+=09=20*=20If=20= extension_destdir=20is=20set,=20try=20to=20find=20the=20file=20there=20= first=0A+=09=20*/=0A+=09if=20(*extension_destdir=20!=3D=20'\0')=0A+=09{=0A= +=09=09if=20(from_version)=0A+=09=09=09snprintf(result,=20MAXPGPATH,=20= "%s%s/%s--%s--%s.sql",=0A+=09=09=09=09=09=20extension_destdir,=20= scriptdir,=20control->name,=20from_version,=20version);=0A+=09=09else=0A= +=09=09=09snprintf(result,=20MAXPGPATH,=20"%s%s/%s--%s.sql",=0A+=09=09=09= =09=09=20extension_destdir,=20scriptdir,=20control->name,=20version);=0A= +=09=09if=20(pg_file_exists(result))=0A+=09=09{=0A+=09=09=09= pfree(scriptdir);=0A+=09=09=09return=20result;=0A+=09=09}=0A+=09}=0A=20=09= if=20(from_version)=0A=20=09=09snprintf(result,=20MAXPGPATH,=20= "%s/%s--%s--%s.sql",=0A=20=09=09=09=09=20scriptdir,=20control->name,=20= from_version,=20version);=0A@@=20-1209,6=20+1246,59=20@@=20= get_ext_ver_list(ExtensionControlFile=20*control)=0A=20=09DIR=09=09=20=20= =20*dir;=0A=20=09struct=20dirent=20*de;=0A=20=0A+=09/*=0A+=09=20*=20If=20= extension_destdir=20is=20set,=20try=20to=20find=20the=20files=20there=20= first=0A+=09=20*/=0A+=09if=20(*extension_destdir=20!=3D=20'\0')=0A+=09{=0A= +=09=09char=09=09location[MAXPGPATH];=0A+=0A+=09=09snprintf(location,=20= MAXPGPATH,=20"%s%s",=20extension_destdir,=0A+=09=09=09=09= get_extension_script_directory(control));=0A+=09=09dir=20=3D=20= AllocateDir(location);=0A+=09=09while=20((de=20=3D=20ReadDir(dir,=20= location))=20!=3D=20NULL)=0A+=09=09{=0A+=09=09=09char=09=20=20=20= *vername;=0A+=09=09=09char=09=20=20=20*vername2;=0A+=09=09=09= ExtensionVersionInfo=20*evi;=0A+=09=09=09ExtensionVersionInfo=20*evi2;=0A= +=0A+=09=09=09/*=20must=20be=20a=20.sql=20file=20...=20*/=0A+=09=09=09if=20= (!is_extension_script_filename(de->d_name))=0A+=09=09=09=09continue;=0A+=0A= +=09=09=09/*=20...=20matching=20extension=20name=20followed=20by=20= separator=20*/=0A+=09=09=09if=20(strncmp(de->d_name,=20control->name,=20= extnamelen)=20!=3D=200=20||=0A+=09=09=09=09de->d_name[extnamelen]=20!=3D=20= '-'=20||=0A+=09=09=09=09de->d_name[extnamelen=20+=201]=20!=3D=20'-')=0A+=09= =09=09=09continue;=0A+=0A+=09=09=09/*=20extract=20version=20name(s)=20= from=20'extname--something.sql'=20filename=20*/=0A+=09=09=09vername=20=3D=20= pstrdup(de->d_name=20+=20extnamelen=20+=202);=0A+=09=09=09= *strrchr(vername,=20'.')=20=3D=20'\0';=0A+=09=09=09vername2=20=3D=20= strstr(vername,=20"--");=0A+=09=09=09if=20(!vername2)=0A+=09=09=09{=0A+=09= =09=09=09/*=20It's=20an=20install,=20not=20update,=20script;=20record=20= its=20version=20name=20*/=0A+=09=09=09=09evi=20=3D=20= get_ext_ver_info(vername,=20&evi_list);=0A+=09=09=09=09evi->installable=20= =3D=20true;=0A+=09=09=09=09continue;=0A+=09=09=09}=0A+=09=09=09*vername2=20= =3D=20'\0';=09=09/*=20terminate=20first=20version=20*/=0A+=09=09=09= vername2=20+=3D=202;=09=09=09/*=20and=20point=20to=20second=20*/=0A+=0A+=09= =09=09/*=20if=20there's=20a=20third=20--,=20it's=20bogus,=20ignore=20it=20= */=0A+=09=09=09if=20(strstr(vername2,=20"--"))=0A+=09=09=09=09continue;=0A= +=0A+=09=09=09/*=20Create=20ExtensionVersionInfos=20and=20link=20them=20= together=20*/=0A+=09=09=09evi=20=3D=20get_ext_ver_info(vername,=20= &evi_list);=0A+=09=09=09evi2=20=3D=20get_ext_ver_info(vername2,=20= &evi_list);=0A+=09=09=09evi->reachable=20=3D=20lappend(evi->reachable,=20= evi2);=0A+=09=09}=0A+=09=09FreeDir(dir);=0A+=09}=0A+=0A=20=09location=20= =3D=20get_extension_script_directory(control);=0A=20=09dir=20=3D=20= AllocateDir(location);=0A=20=09while=20((de=20=3D=20ReadDir(dir,=20= location))=20!=3D=20NULL)=0Adiff=20--git=20= a/src/backend/utils/fmgr/dfmgr.c=20b/src/backend/utils/fmgr/dfmgr.c=0A= index=20092004dcf3..25971b25b6=20100644=0A---=20= a/src/backend/utils/fmgr/dfmgr.c=0A+++=20= b/src/backend/utils/fmgr/dfmgr.c=0A@@=20-35,6=20+35,7=20@@=0A=20#include=20= "miscadmin.h"=0A=20#include=20"storage/fd.h"=0A=20#include=20= "storage/shmem.h"=0A+#include=20"utils/guc.h"=0A=20#include=20= "utils/hsearch.h"=0A=20=0A=20=0A@@=20-415,7=20+416,7=20@@=20= expand_dynamic_library_name(const=20char=20*name)=0A=20{=0A=20=09bool=09=09= have_slash;=0A=20=09char=09=20=20=20*new;=0A-=09char=09=20=20=20*full;=0A= +=09char=09=20=20=20*full,=20*full2;=0A=20=0A=20=09Assert(name);=0A=20=0A= @@=20-430,6=20+431,19=20@@=20expand_dynamic_library_name(const=20char=20= *name)=0A=20=09else=0A=20=09{=0A=20=09=09full=20=3D=20= substitute_libpath_macro(name);=0A+=09=09/*=0A+=09=09=20*=20If=20= extension_destdir=20is=20set,=20try=20to=20find=20the=20file=20there=20= first=0A+=09=09=20*/=0A+=09=09if=20(*extension_destdir=20!=3D=20'\0')=0A= +=09=09{=0A+=09=09=09full2=20=3D=20psprintf("%s%s",=20extension_destdir,=20= full);=0A+=09=09=09if=20(pg_file_exists(full2))=0A+=09=09=09{=0A+=09=09=09= =09pfree(full);=0A+=09=09=09=09return=20full2;=0A+=09=09=09}=0A+=09=09=09= pfree(full2);=0A+=09=09}=0A=20=09=09if=20(pg_file_exists(full))=0A=20=09=09= =09return=20full;=0A=20=09=09pfree(full);=0A@@=20-448,6=20+462,19=20@@=20= expand_dynamic_library_name(const=20char=20*name)=0A=20=09{=0A=20=09=09= full=20=3D=20substitute_libpath_macro(new);=0A=20=09=09pfree(new);=0A+=09= =09/*=0A+=09=09=20*=20If=20extension_destdir=20is=20set,=20try=20to=20= find=20the=20file=20there=20first=0A+=09=09=20*/=0A+=09=09if=20= (*extension_destdir=20!=3D=20'\0')=0A+=09=09{=0A+=09=09=09full2=20=3D=20= psprintf("%s%s",=20extension_destdir,=20full);=0A+=09=09=09if=20= (pg_file_exists(full2))=0A+=09=09=09{=0A+=09=09=09=09pfree(full);=0A+=09=09= =09=09return=20full2;=0A+=09=09=09}=0A+=09=09=09pfree(full2);=0A+=09=09}=0A= =20=09=09if=20(pg_file_exists(full))=0A=20=09=09=09return=20full;=0A=20=09= =09pfree(full);=0Adiff=20--git=20a/src/backend/utils/misc/guc_tables.c=20= b/src/backend/utils/misc/guc_tables.c=0Aindex=20630ed0f162..1f5430fd76=20= 100644=0A---=20a/src/backend/utils/misc/guc_tables.c=0A+++=20= b/src/backend/utils/misc/guc_tables.c=0A@@=20-543,6=20+543,7=20@@=20char=09= =20=20=20*ConfigFileName;=0A=20char=09=20=20=20*HbaFileName;=0A=20char=09= =20=20=20*IdentFileName;=0A=20char=09=20=20=20*external_pid_file;=0A= +char=09=20=20=20*extension_destdir;=0A=20=0A=20char=09=20=20=20= *application_name;=0A=20=0A@@=20-4489,6=20+4490,17=20@@=20struct=20= config_string=20ConfigureNamesString[]=20=3D=0A=20=09=09= check_canonical_path,=20NULL,=20NULL=0A=20=09},=0A=20=0A+=09{=0A+=09=09= {"extension_destdir",=20PGC_SUSET,=20FILE_LOCATIONS,=0A+=09=09=09= gettext_noop("Path=20to=20prepend=20for=20extension=20loading."),=0A+=09=09= =09gettext_noop("This=20directory=20is=20prepended=20to=20paths=20when=20= loading=20extensions=20(control=20and=20SQL=20files),=20and=20to=20the=20= '$libdir'=20directive=20when=20loading=20modules=20that=20back=20= functions.=20The=20location=20is=20made=20configurable=20to=20allow=20= build-time=20testing=20of=20extensions=20that=20do=20not=20have=20been=20= installed=20to=20their=20proper=20location=20yet."),=0A+=09=09=09= GUC_SUPERUSER_ONLY=0A+=09=09},=0A+=09=09&extension_destdir,=0A+=09=09"",=0A= +=09=09NULL,=20NULL,=20NULL=0A+=09},=0A+=0A=20=09{=0A=20=09=09= {"ssl_library",=20PGC_INTERNAL,=20PRESET_OPTIONS,=0A=20=09=09=09= gettext_noop("Shows=20the=20name=20of=20the=20SSL=20library."),=0Adiff=20= --git=20a/src/backend/utils/misc/postgresql.conf.sample=20= b/src/backend/utils/misc/postgresql.conf.sample=0Aindex=20= 9ec9f97e92..152997e67e=20100644=0A---=20= a/src/backend/utils/misc/postgresql.conf.sample=0A+++=20= b/src/backend/utils/misc/postgresql.conf.sample=0A@@=20-771,6=20+771,8=20= @@=0A=20#=20-=20Other=20Defaults=20-=0A=20=0A=20#dynamic_library_path=20= =3D=20'$libdir'=0A+#extension_destdir=20=3D=20''=09=09=09#=20prepend=20= path=20when=20loading=20extensions=0A+=09=09=09=09=09#=20and=20shared=20= objects=20(added=20by=20Debian)=0A=20#gin_fuzzy_search_limit=20=3D=200=0A= =20=0A=20=0Adiff=20--git=20a/src/include/utils/guc.h=20= b/src/include/utils/guc.h=0Aindex=20ff506bf48d..eaf0b4f337=20100644=0A= ---=20a/src/include/utils/guc.h=0A+++=20b/src/include/utils/guc.h=0A@@=20= -277,6=20+277,7=20@@=20extern=20PGDLLIMPORT=20char=20*ConfigFileName;=0A=20= extern=20PGDLLIMPORT=20char=20*HbaFileName;=0A=20extern=20PGDLLIMPORT=20= char=20*IdentFileName;=0A=20extern=20PGDLLIMPORT=20char=20= *external_pid_file;=0A+extern=20PGDLLIMPORT=20char=20*extension_destdir;=0A= =20=0A=20extern=20PGDLLIMPORT=20char=20*application_name;=0A=20=0A--=20=0A= 2.45.2=0A=0A= --Apple-Mail=_AE33153C-2A96-48DD-B05D-3C56377210F1 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_AE33153C-2A96-48DD-B05D-3C56377210F1--