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 1sMEi4-001HDt-NB for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Jun 2024 22:32:21 +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 1sMEi2-000lGD-Eh for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Jun 2024 22:32:18 +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 1sMEi1-000lG4-Kv for pgsql-hackers@lists.postgresql.org; Tue, 25 Jun 2024 22:32:18 +0000 Received: from pb-smtp20.pobox.com ([173.228.157.52]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sMEhq-0037ps-UB for pgsql-hackers@postgresql.org; Tue, 25 Jun 2024 22:32:16 +0000 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id AA6C42C576; Tue, 25 Jun 2024 18:32:04 -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=VTuYHdRsFs6eO/vsCqShPeI0du9B1iiOFy qOqJtPuoU=; b=rPpi0dIL9qXwVIAFGJIQhBaUXGvQYVrHe/u3ErQT8jHbLoK80Z ehvtAd5u8UPauplap8Un+D+QfI1YZFeJkpMgq3ITcf7cNjC5Nz2JiA+/J8MNevAb dqDJHMwx4NP7ZyvCWvltM3rZMvUF/ye3DJNHFZVIGLUQJnCzMdK+JTKrQ= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 958B52C575; Tue, 25 Jun 2024 18:32:04 -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=VTuYHdRsFs6eO/vsCqShPeI0du9B1iiOFyqOqJtPuoU=; b=oLeL7rYwF3b2i3UOZ6s7He6dfkgiv9dSi1Turtl6KAHZxXwfz4E8FI4Vg8+UALWVGFV4d6mfW0QE3w/YRnpnReqN2H9TE+YS71aVWrTgXdU9sAS8rpbzbOxVEKXczzvSqaVSY9DHipgyafbs6iMPwIi8efCCvnQhixfdSRk0P/E= 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-smtp20.pobox.com (Postfix) with ESMTPSA id 1AC742C572; Tue, 25 Jun 2024 18:31:59 -0400 (EDT) (envelope-from david@justatheory.com) From: David E. Wheeler Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_DAB8CAAD-8AF7-4C0E-B8E6-4372F4CF209E" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: RFC: Additional Directory for Extensions Date: Tue, 25 Jun 2024 18:31:46 -0400 In-Reply-To: Cc: Alvaro Herrera , PostgreSQL-development To: Robert Haas References: <202406251012.brdp2dobkf7n@alvherre.pgsql> X-Mailer: Apple Mail (2.3774.500.171.1.1) X-Pobox-Relay-ID: BC7FB4F8-3342-11EF-9DB5-C38742FD603B-76319746!pb-smtp20.pobox.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_DAB8CAAD-8AF7-4C0E-B8E6-4372F4CF209E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On Jun 25, 2024, at 10:43=E2=80=AFAM, Robert Haas = wrote: > If we want to work on making the sorts of changes that > you're proposing, let's do it on a separate thread. It's not going to > be meaningfully harder to move in that direction after some patch like > this than it is today. I appreciate this separation of concerns, Robert. In other news, here=E2=80=99s an updated patch that expands the = documentation to record that the destination directory is a prefix, and = full paths should be used under it. Also take the opportunity to = document the PGXS DESTDIR variable as the thing to use to install files = under the destination directory. It still requires a server restart; I can change it back to = superuser-only if that=E2=80=99s the consensus. For those who prefer a GitHub patch review experience, see this PR: https://github.com/theory/postgres/pull/3/files Best, David --Apple-Mail=_DAB8CAAD-8AF7-4C0E-B8E6-4372F4CF209E Content-Disposition: attachment; filename=v4-0001-Add-extension_destdir-GUC.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="v4-0001-Add-extension_destdir-GUC.patch" Content-Transfer-Encoding: quoted-printable =46rom=20698bdd970c18585320b222ecc2b0906ace3177c6=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20"David=20E.=20Wheeler"=20= =0ADate:=20Tue,=2025=20Jun=202024=2018:28:27=20= -0400=0ASubject:=20[PATCH=20v4]=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= Changing=20the=0Aconfiguration=20requires=20a=20server=20restart,=20and=20= is=20visible=20only=20to=20super=0Ausers.=0A=0AAlso=20document=20the=20= PGXS=20`DESTDIR`=20variable,=20which=20should=20be=20used=20to=0Ainstall=20= extensions=20into=20the=20proper=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|=2035=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,=20179=20= insertions(+),=202=20deletions(-)=0A=0Adiff=20--git=20= a/doc/src/sgml/config.sgml=20b/doc/src/sgml/config.sgml=0Aindex=20= 0c7a9082c5..350ed5b9c9=20100644=0A---=20a/doc/src/sgml/config.sgml=0A+++=20= b/doc/src/sgml/config.sgml=0A@@=20-10389,6=20+10389,41=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= When=20set,=20the=20postmaster=20will=20search=20this=20directory=20for=20= an=0A+=20=20=20=20=20=20=20=20extension=20before=20searching=20the=20= default=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=20For=20example,=20this=20= configuration:=0A+=0A+extension_destdir=20=3D=20= '/mnt/extensions'=0A+=0A+=20=20=20=20=20=20=20=20will=20= allow=20PostgreSQL=20to=20first=20look=20for=0A= +=20=20=20=20=20=20=20=20extension=20control=20files,=20SQL=20files,=20= and=20loadable=20modules=20installed=20in=0A+=20=20=20=20=20=20=20=20= /mnt/extensions=20and=20fall=20back=20on=20the=0A+=20=20= =20=20=20=20=20=20default=20directories=20if=20they're=20not=20found=20= there.=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=20should=20= be=20installed=20in=20their=20full=20paths=20under=20the=0A+=20=20=20=20=20= =20=20=20extension_destdir=20prefix.=20When=20using=0A= +=20=20=20=20=20=20=20=20PGXS=20= to=20install=20an=20extension,=20pass=0A+=20=20=20=20=20=20=20=20the=20= destination=20directory=20via=20the=20DESTDIR=20= variable=0A+=20=20=20=20=20=20=20=20to=20install=20the=20files=20in=20= the=20proper=20location.=20For=20more=20information=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=2046c258be28..8a3c6e2968=20= 100644=0A---=20a/src/backend/utils/misc/guc_tables.c=0A+++=20= b/src/backend/utils/misc/guc_tables.c=0A@@=20-541,6=20+541,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-4487,6=20+4488,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_POSTMASTER,=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= e0567de219..93a70487b6=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=_DAB8CAAD-8AF7-4C0E-B8E6-4372F4CF209E Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_DAB8CAAD-8AF7-4C0E-B8E6-4372F4CF209E--