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

From David E. Wheeler
Subject Re: RFC: Additional Directory for Extensions
Date
Msg-id 7B93D5E6-135F-4D7E-8DEB-1D17C4F0E204@justatheory.com
Whole thread Raw
In response to Re: RFC: Additional Directory for Extensions  (Jelte Fennema-Nio <postgres@jeltef.nl>)
Responses Re: RFC: Additional Directory for Extensions
List pgsql-hackers
On Jun 24, 2024, at 5:32 PM, Jelte Fennema-Nio <postgres@jeltef.nl> wrote:

> Still, for the sake of completeness it might make sense to support
> this whole list in extension_destdir. (assuming it's easy to do)

It should be with the current patch, which just uses a prefix to paths in `pg_config`. So if SHAREDIR is set to
/usr/share/postgresql/16and extension_destdir is set to /mount/ext, then Postgres will look for files in
/mount/ext/usr/share/postgresql/16.The same rule applies (or should apply) for all other pg_config directory configs
andwhere the postmaster looks for specific files. And PGXS already supports installing files in these locations, thanks
toits DESTDIR param. 

(I don’t know how it works on Windows, though.)

That said, this is very much a pattern designed for RPM and Debian package management patterns, and not for actually
installingand managing extensions. And maybe that’s fine for now, as it can still be used to address the immutability
problemsdescried in the original post in this thread. 

Ultimately, I’d like to figure out a way to more tidily organize installed extension files, but I think that, too,
mightbe a separate thread. 

Best,

David




pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin
Next
From: Nathan Bossart
Date:
Subject: Re: New standby_slot_names GUC in PG 17