| From: | Matheus Alcantara <matheusssilv97(at)gmail(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: extension_control_path: ignore empty elements and deduplicate directories |
| Date: | 2026-11-16 16:40:50 |
| Message-ID: | 1bbcef6b-e72f-4961-ace2-fa6c04719aa4@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 16/11/26 13:26, Andres Freund wrote:
> Hi,
>
> On 2026-11-16 13:20:41 -0300, Matheus Alcantara wrote:
>> On Mon Nov 16, 2026 at 12:10 PM -03, Andres Freund wrote:
>>> I don't like silently ignoring user mistakes. Either we should make it an
>>> error or accept it. Which user would be served by silently reinterpreting
>>> what they might have meant?
>>>
>>
>> The idea on v6 is that it just discard empty path elements. It doesn't
>> mean that the path element will be reinterpreted. So if an user set
>> extension_control_path = '$system:' just $system will be used.
>>
>> We already ignore paths that does not exists, so the idea was to follow
>> the same behavior.
>
> I don't think that's the same. A non-existing extension dir could make sense,
> e.g. to allow installing extensions from container overlays. And it's not
> ignoring the users intent to ignore it, since there obviously aren't
> extensions in there. What's the argument for ignoring empty path elements
> instead of erroring out?
>
I think that is mostly for back-patching. Turning into an error would
make a server to not start after a minor release upgrade. Querying
pg_available_extensions would also break after the upgrade with an
empty path element.
Ideally I also think that raising an error would be better, but this
back-patching issue got me, and having different behaviors across
different versions also seems confusing to me, but I might being to
conservative here.
(Thinking while writing this, and not being too conservative, perhaps
we can consider to ignore empty path elements for back-patching and
change master to raise an error since the with extension_control_path
= '$system:' is an invalid syntax.).
--
Matheus Alcantara
EDB: https://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sami Imseih | 2026-11-16 16:56:09 | Re: pgstat: Flush some statistics within running transactions, take 2 |
| Previous Message | Andres Freund | 2026-11-16 16:26:22 | Re: extension_control_path: ignore empty elements and deduplicate directories |