Re: Only one version can be installed when using extension_control_path
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Pierrick <pierrick.chovelon@dalibo.com>
Cc: "pgsql-hackers@lists.postgresql.org"
<pgsql-hackers@lists.postgresql.org>,
"David G. Johnston" <david.g.johnston@gmail.com>,
Tom Lane <tgl@sss.pgh.pa.us>, Matheus Alcantara <matheusssilv97@gmail.com>
Date: 2025-09-11T14:11:43Z
Lists: pgsql-hackers
Attachments
- 0001-Hide-duplicate-names-from-extension-views.patch (text/plain) patch 0001
On 10.09.25 09:48, Pierrick wrote: > On 09/09/2025 16:18, Matheus Alcantara wrote: >> On Tue Sep 9, 2025 at 4:53 AM -03, Pierrick wrote: >>> On 08/09/2025 17:35, Tom Lane wrote: >>>> "David G. Johnston"<david.g.johnston@gmail.com> writes: >>>>> On Monday, September 8, 2025, Matheus Alcantara<matheusssilv97@gmail.com> >>>>> wrote: >>>>>> On this step it will search the .control >>>>>> file on paths at extension_control_path in order and it will use the >>>>>> first one that it finds and based on the .control file found it will >>>>>> install the extension using the version specified on the command. >>>>> Then pg_available_extensions seems broken - it lists extensions as >>>>> available that are not accessible to the user due to this policy. Maybe we >>>>> need to add something indicating that certain rows are hidden behind the >>>>> present path setting which would need to be changed if one wishes to >>>>> install them. Also seems like the extension location should be part of the >>>>> output too. >>> I agree. If an extension is the list, I expect to be able to install it. >>> >> I definitely agree that pg_available_extensions is wrong but I think >> that a fix for this should be to don't allow extensions with the same >> name on different paths. >> >> The current behavior is to stop the searching when the first extension >> name matches with the CREATE EXTENSION input, this works in the same way >> when for example we have the same command on multiple paths on PATH. > > If so, then only one line should be printed in pg_available_extensions. > This could be the fix :). Here is a patch for that. Please test it against your setup.
Commits
-
Hide duplicate names from extension views
- bf5da5d6cae9 19 (unreleased) landed
- 8309f3f86da8 18.0 landed