Re: extension_control_path

From: Sergey Muraviov <sergey(dot)k(dot)muraviov(at)gmail(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: extension_control_path
Date: 2014-01-30 18:06:57
Message-ID: CAJTaR31o9LTOyjdsKhWiDre_MNfUwM1UKZJmSRn5uefS1Kz+HQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi.

Now it looks fine for me.

2014-01-28 Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>:

> Hi,
>
> Sergey Muraviov <sergey(dot)k(dot)muraviov(at)gmail(dot)com> writes:
> > Now patch applies cleanly and works. :-)
>
> Cool ;-)
>
> > But I have some notes:
> >
> > 1. There is an odd underscore character in functions
> > find_in_extension_control_path and list_extension_control_paths:
> > \"extension_control__path\""
>
> Fixed in the new version of the patch, attached.
>
> > 2. If we have several versions of one extension in different directories
> > (which are listed in extension_control_path parameter) then we
> > get strange output from pg_available_extensions and
> > pg_available_extension_versions views (Information about extension, whose
> > path is at the beginning of the list, is duplicated). And only one
> version
> > of the extension can be created.
>
> Fixed.
>
> > 3. It would be fine to see an extension control path
> > in pg_available_extensions and pg_available_extension_versions views (in
> > separate column or within of extension name).
>
> I think the on-disk location is an implementation detail and decided in
> the attached version not to change those system view definitions.
>
> > 4. Perhaps the CREATE EXTENSION command should be improved to allow
> > creation of the required version of the extension.
> > So we can use different versions of extensions in different databases.
>
> Fixed in the attached.
>
> I also fixed ALTER EXTENSION UPDATE to search for udpate scripts in the
> same directory where the main control file is found, but I suspect this
> part requires more thinking.
>
> When we ALTER EXTENSION UPDATE we might now have several places where we
> find extname.control files, with possibly differents default_version
> properties.
>
> In the attached, we select the directory containing the control file
> where default_version matches the already installed extension version.
> That matches with a model where the new version of the extension changes
> the default_version in an auxiliary file.
>
> We might want to instead match on the default_version in the control
> file to match with the new version we are asked to upgrade to.
>
> Regards,
> --
> Dimitri Fontaine
> http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
>
>

--
Best regards,
Sergey Muraviov

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-01-30 18:11:32 Re: Patch: compiling the docs under Gentoo
Previous Message Hannu Krosing 2014-01-30 18:03:29 Re: jsonb and nested hstore