From: Chao Li <li.evan.chao@gmail.com>
To: Matheus Alcantara <matheusssilv97@gmail.com>
Cc: Mahendrakar Srinivasarao <mahendrakarforpg@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: [PATCH] doc: Fix description of relative extension "directory" setting
Date: Wed, 11 Nov 2026 13:19:23 +0800
Message-ID: <F932AFC4-CEDE-472A-9FE0-D484F1415C62@gmail.com> (raw)
In-Reply-To: <DMRO9UIYZB8O.1JJKUR441FJL5@gmail.com>
References: <CABkiuWpGiLzDg4D8zRBJ6DHnwYgHqkFxz2gDstXgeOdzh6bdZQ@mail.gmail.com>
<E514FFA2-2F41-4B34-93AE-2BF61C61E623@gmail.com>
<CABkiuWo91bRaYXZ6Snc182iVb9m+bzYSMpEUvv=_Z9Fg=+FOXw@mail.gmail.com>
<A40EAC4A-F75E-405F-8A15-92A203AE5B95@gmail.com>
<CABkiuWqY0FQnhO6xswkHEP_dEUVueJuAhBvEdDLZpB=GyW9_gw@mail.gmail.com>
<DMQTNLET8EKG.2BKGGLIOA4OQY@gmail.com>
<CABkiuWr_5koiHieR-CJ6dROVJ_F3a==fKf4n8EPqkj0JgmJshg@mail.gmail.com>
<DMRO9UIYZB8O.1JJKUR441FJL5@gmail.com>
> On Nov 11, 2026, at 00:30, Matheus Alcantara <matheusssilv97@gmail.com> wrote:
>
> On Tue Nov 10, 2026 at 11:24 AM -03, Mahendrakar Srinivasarao wrote:
>>> The attached v3 includes a 0002 that fixes the docs for this.
>>
>> I can reproduce it: with extension_control_path = '$system/foo',
>> pg_available_extensions returns no rows and CREATE EXTENSION fails with
>> "component in parameter "extension_control_path" is not an absolute
>> path". It's even more confusing when combined with a valid element:
>> with extension_control_path = '$system/foo:$system',
>> pg_available_extensions lists the extensions from $system (the bad
>> element is silently skipped as a nonexistent directory), but CREATE
>> EXTENSION on any of them still fails with the same error, because
>> find_in_paths() rejects the first element before it gets to $system.
>>
>>
>> 0002 looks good and is included in v4 unchanged.
>>
>
> Thanks for checking!
>
>> Two related things I noticed while testing:
>>
>> - The long_desc of extension_control_path in guc_parameters.dat
>> (guc_tables.c on 18) has the same "loaded from the same directory
>> where the primary control file was found" sentence that 0001 fixes in
>> config.sgml. The new 0003 adjusts it to match. Since it's a
>> translatable string, I've kept it separate and meant it for master
>> only, so 0001 and 0002 can be backpatched without it.
>>
>
> Good.
>
>> - The '$system/foo:$system' inconsistency comes from find_in_paths()
>> and pg_available_extensions handling an invalid element differently,
>> and from nothing validating the value when it's set. Would a check
>> hook that rejects such elements at SET time be worth pursuing? One
>> concern is that it could break existing setups: a value like
>> '$system:$system/foo' works today for any extension found in $system,
>> but with a check hook it would be rejected, and in postgresql.conf
>> that would prevent the server from starting after an upgrade.
>> dynamic_library_path also only validates its elements when they're
>> used. If there's interest I can start a separate thread for that;
>> it's not addressed in v4.
>>
>
> This seems related with another discussion about an
> extension_control_path bug [1] that accepts an empty path element and
> append /extension by mistake. I think that we can discuss about this
> case on this other thread.
>
>> v4-0001 and v4-0002 are rebased on current master and apply cleanly to
>> REL_19_STABLE and REL_18_STABLE; the docs build without warnings.
>> v4-0003 applies on master (and REL_19_STABLE, if wanted there); it
>> builds and passes make check.
>
> v4 looks good to me, thanks!
>
V4 LGTM too.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.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: li.evan.chao@gmail.com, matheusssilv97@gmail.com, mahendrakarforpg@gmail.com
Subject: Re: [PATCH] doc: Fix description of relative extension "directory" setting
In-Reply-To: <F932AFC4-CEDE-472A-9FE0-D484F1415C62@gmail.com>
References: <CABkiuWpGiLzDg4D8zRBJ6DHnwYgHqkFxz2gDstXgeOdzh6bdZQ@mail.gmail.com> <E514FFA2-2F41-4B34-93AE-2BF61C61E623@gmail.com> <CABkiuWo91bRaYXZ6Snc182iVb9m+bzYSMpEUvv=_Z9Fg=+FOXw@mail.gmail.com> <A40EAC4A-F75E-405F-8A15-92A203AE5B95@gmail.com> <CABkiuWqY0FQnhO6xswkHEP_dEUVueJuAhBvEdDLZpB=GyW9_gw@mail.gmail.com> <DMQTNLET8EKG.2BKGGLIOA4OQY@gmail.com> <CABkiuWr_5koiHieR-CJ6dROVJ_F3a==fKf4n8EPqkj0JgmJshg@mail.gmail.com> <DMRO9UIYZB8O.1JJKUR441FJL5@gmail.com> <F932AFC4-CEDE-472A-9FE0-D484F1415C62@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