aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/guc_tables.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-03-19 06:57:20 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-03-19 07:03:20 +0100
commit4f7f7b0375854e2f89876473405a8f21c95012af (patch)
treec413b2bd115ee78c960607db7986e206ddae96f1 /src/backend/utils/misc/guc_tables.c
parent2cce0fe440fb3f252a7be70a89298168009a2c15 (diff)
downloadpostgresql-4f7f7b0375854e2f89876473405a8f21c95012af.tar.gz
postgresql-4f7f7b0375854e2f89876473405a8f21c95012af.zip
extension_control_path
The new GUC extension_control_path specifies a path to look for extension control files. The default value is $system, which looks in the compiled-in location, as before. The path search uses the same code and works in the same way as dynamic_library_path. Some use cases of this are: (1) testing extensions during package builds, (2) installing extensions outside security-restricted containers like Python.app (on macOS), (3) adding extensions to PostgreSQL running in a Kubernetes environment using operators such as CloudNativePG without having to rebuild the base image for each new extension. There is also a tweak in Makefile.global so that it is possible to install extensions using PGXS into an different directory than the default, using 'make install prefix=/else/where'. This previously only worked when specifying the subdirectories, like 'make install datadir=/else/where/share pkglibdir=/else/where/lib', for purely implementation reasons. (Of course, without the path feature, installing elsewhere was rarely useful.) Author: Peter Eisentraut <peter@eisentraut.org> Co-authored-by: Matheus Alcantara <matheusssilv97@gmail.com> Reviewed-by: David E. Wheeler <david@justatheory.com> Reviewed-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Reviewed-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com> Reviewed-by: Niccolò Fei <niccolo.fei@enterprisedb.com> Discussion: https://www.postgresql.org/message-id/flat/E7C7BFFB-8857-48D4-A71F-88B359FADCFD@justatheory.com
Diffstat (limited to 'src/backend/utils/misc/guc_tables.c')
-rw-r--r--src/backend/utils/misc/guc_tables.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c
index ead80257192..cc8f2b1230a 100644
--- a/src/backend/utils/misc/guc_tables.c
+++ b/src/backend/utils/misc/guc_tables.c
@@ -39,6 +39,7 @@
#include "catalog/namespace.h"
#include "catalog/storage.h"
#include "commands/async.h"
+#include "commands/extension.h"
#include "commands/event_trigger.h"
#include "commands/tablespace.h"
#include "commands/trigger.h"
@@ -4365,6 +4366,18 @@ struct config_string ConfigureNamesString[] =
},
{
+ {"extension_control_path", PGC_SUSET, CLIENT_CONN_OTHER,
+ gettext_noop("Sets the path for extension control files."),
+ gettext_noop("The remaining extension script and secondary control files are then loaded "
+ "from the same directory where the primary control file was found."),
+ GUC_SUPERUSER_ONLY
+ },
+ &Extension_control_path,
+ "$system",
+ NULL, NULL, NULL
+ },
+
+ {
{"krb_server_keyfile", PGC_SIGHUP, CONN_AUTH_AUTH,
gettext_noop("Sets the location of the Kerberos server key file."),
NULL,