[postgis-devel] Separate make target to install extension upgrade scripts ?
Sandro Santilli
strk at kbt.io
Thu Jan 26 08:41:52 PST 2023
On Thu, Jan 26, 2023 at 07:55:28AM -0500, Greg Troxel wrote:
> Sandro Santilli <strk at kbt.io> writes:
> I don't follow
>
> > given the "postgis" script lets you install extension upgrade scripts
> > as needed
>
> Do you mean that after the reduced install, with the sources gone, you
> can as root run "postgis mumble" and have upgrade scripts generated
> (from files that were installed) and placed into the system? Or did
> you mean something else?
That's pretty much what I meant, although I was not thinking to
install the *list* from "supported old versions", which would still
only be available at build time.
In normal cases you don't need/care about being able to install from
any of the *known* old versions (86 at the time of writing, see
extensions/upgradeable_versions.mk) so I'd rather not install that
knowledge, which is bound to get obsoleted anyway by new patch-level
releases.
What you can do with the `postgis` utility is:
install-extension-upgrades [--pg_sharedir <dir>] [--extension <name>] [<from>...]
Ensure files required to upgrade PostGIS from
the given version are installed on the system.
The <from> arguments may be either version numbers
or PostgreSQL share directories to scan to find
available ones.
So, say you get a message like "no upgrade path from 3.0.11 to 3.4.0"
you can do:
postgis install-extension-upgrades 3.0.11
And move on.
> (As an aside, if so, from there it seems a small step to an upgrade
> command that stages the script in /tmp, runs it, and discards the script.)
As a package, if you can tell WHICH older version is going to be
removed, you could just run:
postgis install-extension-upgrades $OLDVERSION
after having installed the new version.
--strk;
Libre GIS consultant/developer
https://strk.kbt.io/services.html
More information about the postgis-devel
mailing list