| From: | Matheus Alcantara <matheusssilv97(at)gmail(dot)com> |
|---|---|
| To: | Jakob Egger <jakob(at)eggerapps(dot)at>, pgsql-hackers(at)postgresql(dot)org |
| Cc: | david(at)justatheory(dot)com, Tobias Bussmann <t(dot)bussmann(at)gmx(dot)net> |
| Subject: | Re: glob support in extension_control_path/dynamic_library_path? |
| Date: | 2026-06-01 09:38:56 |
| Message-ID: | bbf9a0ee-f264-4037-8a02-09fa54a923fc@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 29/05/26 09:26, Jakob Egger wrote:
> Hello!
>
> The extension_control_path setting allowed us to offer precompiled downloadable extensions for Postgres.app: https://postgresapp.com/extensions/
>
> We install extensions each into their own path, for example:
>
> /Users/USER/Library/Application Support/Postgres/Extensions/18/http
> /Users/USER/Library/Application Support/Postgres/Extensions/18/pg_cron
> ....
>
> This allows us to update extensions by just deleting the folder and installing the new version -- we don't need to track all the files belonging to an extension. If we put all separately downloaded extensions in a single directory we would be very likely to end up with orphaned files sooner or later.
>
> However, this leads to a rather lengthy configuration that needs to be updated whenever an extension is installed:
>
> extension_control_path="$system:/Users/jakob/Library/Application Support/Postgres/Extensions/18/pg_parquet/share/postgresql:/Users/jakob/Library/Application Support/Postgres/Extensions/18/pg_cron/share/postgresql:/Users/jakob/Library/Application Support/Postgres/Extensions/18/http/share/postgresql:/Users/jakob/Library/Application Support/Postgres/Extensions/18/timescaledb/share/postgresql:/Users/jakob/Library/Application Support/Postgres/Extensions/18/plv8/share/postgresql:/Users/jakob/Library/Application Support/Postgres/Extensions/18/pg_search/share/postgresql"
>
Yeah, I've also faced some configurations like this when working with
extension_control_path.
> It would be really nice if we could just use glob patterns like this:
>
> extension_control_path="$system:/Users/jakob/Library/Application Support/Postgres/Extensions/18/*/share/postgresql"
> dynamic_library_path="$libdir:/Users/jakob/Library/Application Support/Postgres/Extensions/18/*/lib/postgresql"
>
> This would also have the advantage of not requiring a server restart after installing an extension.
>
> I believe this would also be useful for Docker use case mentioned in the original thread (https://www.postgresql.org/message-id/E7C7BFFB-8857-48D4-A71F-88B359FADCFD%40justatheory.com) when multiple extensions are used
>
> I have tried implementing this patch myself, and it was pretty straightforward to implement a proof of concept.
>
> I wonder if such an addition would be useful for other packagers?
>
Please, share the patch so we can better evaluate.
--
Matheus Alcantara
EDB: https://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jakub Wartak | 2026-06-01 10:01:58 | Re: Heads Up: cirrus-ci is shutting down June 1st |
| Previous Message | Andrei Lepikhov | 2026-06-01 09:30:17 | Re: hashjoins vs. Bloom filters (yet again) |