[postgis-devel] Upgrade paths (again)

Sandro Santilli strk at kbt.io
Wed Sep 14 12:08:46 PDT 2022


On Wed, Sep 14, 2022 at 10:52:14PM +0800, Julien Rouhaud wrote:
> On Sat, Jul 30, 2022 at 08:13:58AM +0200, Sandro Santilli wrote:

> >   SOLUTION1 -- modify system catalog
> >   SOLUTION2 -- patch PostgreSQL
> >   SOLUTION3 -- 0-bytes model
> 
> Have you considered an approach that's somewhat mixing SOLUTION1 and SOLUTION2?
> 
> If the only problem with SOLUTION1 is the possible error due to a lack of
> permission, why not do that in C in the backend, intercepting the ALTER
> EXTENSION command?  This would work even if a non superuser runs the command.
> That's a bit hackish but it still looks a bit better than the SOLUTION3.

Hackish sounds troublesome. Let's see.

> The big downside with that approach is that it only works if postgis has been
> loaded in the backend

This is a no-go. 

> postgis_extensions_upgrade() function could be modified to make sure it first
> load postgis

It would be the OLD postgis_extension_upgrade() running so won't know
which version of postgis shared object to load.

--strk;

  Libre GIS consultant/developer
  https://strk.kbt.io/services.html


More information about the postgis-devel mailing list