Re: Only one version can be installed when using extension_control_path

From: "Matheus Alcantara" <matheusssilv97(at)gmail(dot)com>
To: "Pierrick" <pierrick(dot)chovelon(at)dalibo(dot)com>, <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Only one version can be installed when using extension_control_path
Date: 2025-09-08 15:05:16
Message-ID: DCNIFE5QT5XC.1OIVST564STK8@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri Sep 5, 2025 at 11:22 AM -03, Pierrick wrote:
> If the same extension is in two different paths mentioned in
> extension_control_path,
> it is impossible to install the version of the last one.
>
> postgres=# show extension_control_path ;
>                            extension_control_path
> -----------------------------------------------------------------------------
>  $system:/extensions/meilleureextension/share:/extensions/monextension/share
> (1 row)
>
> postgres=# select * from pg_available_extensions where name like '%mon%';
>      name     | default_version | installed_version |    comment
> --------------+-----------------+-------------------+---------------
>  monextension | 2.0             |                   | Meilleure
>  monextension | 1.0             |                   | Mon extension
>
> (2 rows)
>
> postgres=# create extension monextension version "1.0" ;
> ERROR:  extension "monextension" has no installation script nor update path for version "1.0"
>
> postgres=# create extension monextension ;
> CREATE EXTENSION
> postgres=# select * from pg_available_extensions where name like '%mon%';
> name | default_version | installed_version | comment
> --------------+-----------------+-------------------+---------------
> monextension | 2.0 | 2.0 | Meilleure
> monextension | 1.0 | 2.0 | Mon extension
>
>
> Don't you think that the command
>
> create extension monextension version "1.0" ;
>
> should be accepted by checking in all paths ?
>
This is working as expected. The current behavior is that at the first
step of CREATE EXTENSION command it will try to find the primary
.control file of the extension. 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.

--
Matheus Alcantara

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2025-09-08 15:16:02 Re: A performance regression issue with Memoize
Previous Message David Geier 2025-09-08 14:36:35 Re: Use merge-based matching for MCVs in eqjoinsel