Re: RFC: Additional Directory for Extensions - Mailing list pgsql-hackers

From Christoph Berg
Subject Re: RFC: Additional Directory for Extensions
Date
Msg-id Zg2L8itKwTWF3Xop@msg.df7cb.de
Whole thread Raw
In response to Re: RFC: Additional Directory for Extensions  (Christoph Berg <myon@debian.org>)
List pgsql-hackers
> Fwiw, I wrote this patch to solve the problem of testing extensions at
> build-time where the build process does not have write access to
> PGSHAREDIR. It solves that problem quite well, almost all PG
> extensions have build-time test coverage now (where there was
> basically 0 before).

Also, it's called extension "destdir" because it behaves like DESTDIR
in Makefiles: It prepends the given path to the path that PG is trying
to open when set. So it doesn't allow arbitrary new locations as of
now, just /home/build/foo-1/debian/foo/usr/share/postgresql/17/extension
in addition to /usr/share/postgresql/17/extension. (That is what the
Debian package build process needs, so that restriction/design choice
made sense.)

> Security is not a concern at this point as everything is running as
> the same user, and the test cluster will be wiped right after the
> test. I figured marking the setting as "super user" only was enough
> security at that point, but I would recommend another audit before
> using it together with "trusted" extensions and other things in
> production.

That's also included in the current GUC description:

   This directory is prepended to paths when loading extensions
   (control and SQL files), and to the '$libdir' directive when
   loading modules that back functions. The location is made
   configurable to allow build-time testing of extensions that do not
   have been installed to their proper location yet.

Perhaps I should have included a more verbose "NOT FOR PRODUCTION"
there.

As for compatibility, the patch has been part of the PG 9.5..17 now
for several years, and I'm very happy with extra test coverage it
provides, especially on the Debian architectures that don't have
"autopkgtest" runners yet.

Christoph



pgsql-hackers by date:

Previous
From: Melanie Plageman
Date:
Subject: Re: Streaming read-ready sequential scan code
Next
From: Melanie Plageman
Date:
Subject: Re: Combine Prune and Freeze records emitted by vacuum