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


Reply via email to