Opened 6 years ago

Closed 5 years ago

#4271 closed defect (fixed)

postgis_extensions_upgrade() does nothing when upgrading from same version of Postgis different PostgreSQL

Reported by: robe Owned by: robe
Priority: blocker Milestone: PostGIS 3.0.0
Component: build Version: 2.5.x -- EOL
Keywords: Cc:

Description

So I pg_upgraded by PostgreSQL 10 windows running 2.5.1 to PostgreSQL 11 PostGIS 2.5.1

SELECT postgis_full_version():

Shows:

POSTGIS="2.5.1 r17027" [EXTENSION] PGSQL="100" (procs need upgrade for use with "110") GEOS="3.7.0-CAPI-1.11.0 3.7.1" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.2.4, released 2018/03/19" LIBXML="2.7.8" LIBJSON="0.12" LIBPROTOBUF="1.2.1" RASTER

Next I tried to fix the issue by running:

SELECT postgis_extensions_upgrade();

Still same read

I think our basic extension upgrade is okay though cause I could still do:

ALTER EXTENSION postgis UPDATE TO "2.5.1next";
ALTER EXTENSION postgis UPDATE TO "2.5.1";

To force the upgrade

Change History (8)

comment:1 by robe, 6 years ago

Component: postgisbuild/upgrade/install
Owner: changed from pramsey to robe

comment:2 by strk, 6 years ago

Our postgis_upgrade() script only does the "next" dance IFF using a "dev" install. This is not the case here.

Do we want to accept a "force" parameter, to force the "next" dance ?

comment:3 by robe, 6 years ago

I don't think we need a force, we just want to do the next dance whenever we see the PostgreSQL versions are different.

We have the next for production versions too and it works. In the case of people pg_upgrading from same PostGIS version older PostgreSQL to same PostGIS version to newer PostgreSQL, this is going to be a pretty common occurrence. Let's not confuse them further by telling them they need to do "force".

IT's too late to introduce a force in PostGIS 2.5 anyway since we can't make API changes. We COULD have a force in PostGIS 3.0. Though I'm thinking under what circumstances would I need a force (aside from the dev case and the "When I'm upping my PostgreSQL game, but not my PostGIS game"

Last edited 6 years ago by robe (previous) (diff)

comment:4 by strk, 6 years ago

we just want to do the next dance whenever we see the PostgreSQL versions are different.

Agreed, good thinking !

comment:5 by robe, 6 years ago

Milestone: PostGIS 2.5.2PostGIS 3.0.0

comment:6 by komzpa, 5 years ago

Priority: mediumblocker

comment:7 by Algunenano, 5 years ago

PR in https://github.com/postgis/postgis/pull/449 but I need to setup a cluster to test this with pgupgrade.

comment:8 by Raul Marin, 5 years ago

Resolution: fixed
Status: newclosed

In 17620:

postgis_extensions_upgrade() also updates after pg_upgrade

Closes #4271
Closes https://github.com/postgis/postgis/pull/449

Note: See TracTickets for help on using tickets.