pgsql: doc: Fix description of $system in extension_control_path

From: Daniel Gustafsson <dgustafsson(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: doc: Fix description of $system in extension_control_path
Date: 2026-11-20 21:05:58
Message-ID: E1xUVnx-00000000YmU-3Z8d@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

doc: Fix description of $system in extension_control_path

The documentation specifies that a list element of extension_control_path
that starts with $system gets the system extension directory substituted
for it. However, get_extension_control_directories() only recognizes an
element that is exactly "$system" since commit 81eaaa2c41d.

Any other element, like "$system/foo", is taken as a literal path with
the "extension" suffix appended, so CREATE EXTENSION fails with a "not
an absolute path" error, while pg_available_extensions silently returns
no rows for it.

Expanding $system as a prefix doesn't fit well with the path elements
being base directories to which "extension" is appended, since $system
already points to the extension directory itself. So, rather than
changing the behavior, fix the documentation to say that the element
must be exactly $system.

While at it, clarify that $system is the "extension" subdirectory of
pg_config --sharedir and that the "extension" suffix is not appended
to it.

Backpatch to 18, where the current behavior was introduced.

Author: Matheus Alcantara <mths(dot)dev(at)pm(dot)me>
Reviewed-by: Mahendrakar Srinivasarao <mahendrakarforpg(at)gmail(dot)com>
Reviewed-by: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Discussion: https://postgr.es/m/DMQTNLET8EKG.2BKGGLIOA4OQY@gmail.com
Backpatch-through: 18

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/72ab0515ef7bf08fb47487cb8589b5fd7fd8c0f1

Modified Files
--------------
doc/src/sgml/config.sgml | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2026-11-20 22:19:45 Re: pgsql: Forget the prefetcher's current record in XLogPrefetcherBeginRea
Previous Message Daniel Gustafsson 2026-11-20 21:05:41 pgsql: doc: Fix description of $system in extension_control_path