From: Matheus Alcantara <matheusssilv97@gmail.com>
To: Jakob Egger <jakob@eggerapps.at>
To: pgsql-hackers@postgresql.org
Cc: david@justatheory.com, Tobias Bussmann <t.bussmann@gmx.net>
Subject: Re: glob support in extension_control_path/dynamic_library_path?
Date: Mon, 1 Jun 2026 06:38:56 -0300
Message-ID: <bbf9a0ee-f264-4037-8a02-09fa54a923fc@gmail.com> (raw)
In-Reply-To: <173DB423-A230-41F8-AB24-2590C5053B8E@eggerapps.at>
References: <173DB423-A230-41F8-AB24-2590C5053B8E@eggerapps.at>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: matheusssilv97@gmail.com, jakob@eggerapps.at, t.bussmann@gmx.net
Subject: Re: glob support in extension_control_path/dynamic_library_path?
In-Reply-To: <bbf9a0ee-f264-4037-8a02-09fa54a923fc@gmail.com>
References: <173DB423-A230-41F8-AB24-2590C5053B8E@eggerapps.at> <bbf9a0ee-f264-4037-8a02-09fa54a923fc@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox