[postgis-tickets] [PostGIS] #5545: Postgis upgrade from 3.2.3 to 3.3.2 failing on create or update function st_orderingequals

PostGIS trac at osgeo.org
Tue Sep 26 16:42:03 PDT 2023


#5545: Postgis upgrade from 3.2.3 to 3.3.2 failing on create or update function
st_orderingequals
------------------------------------+---------------------------
  Reporter:  robe                   |      Owner:  strk
      Type:  defect                 |     Status:  new
  Priority:  blocker                |  Milestone:  PostGIS 3.3.5
 Component:  build/upgrade/install  |    Version:  3.4.x
Resolution:                         |   Keywords:  pgextwlist
------------------------------------+---------------------------
Comment (by wodan):

 Hopefully I did not convolute things this way, but `postgres=> ALTER
 EXTENSION postgis UPDATE;` was successful, but running `SELECT
 postgis_extensions_upgrade();` resulted in a different error:
 {{{
 postgres=> SELECT postgis_extensions_upgrade();
 NOTICE:  Updating extension postgis 3.3.2
 NOTICE:  version "3.3.2" of extension "postgis" is already installed
 NOTICE:  Packaging and updating postgis_raster
 ERROR:  Trying to add VIEW raster_columns to postgis_raster, got must be
 owner of extension postgis_raster (42501)
 CONTEXT:  PL/pgSQL function _postgis_package_object(text,text) line 28 at
 RAISE
 SQL statement "CREATE EXTENSION postgis_raster SCHEMA
 ecosystem_observation_app VERSION unpackaged;ALTER EXTENSION
 postgis_raster UPDATE TO "3.3.2""
 PL/pgSQL function postgis_extensions_upgrade() line 77 at EXECUTE
 }}}

 I was able to run the `CREATE OR REPLACE FUNCTION
 _postgis_drop_function_if_needed` and also ran
 {{{
 postgres=> SELECT _postgis_drop_function_if_needed
         (
         'st_orderingequals_deprecated_by_postgis_300',
         'GeometryA geometry, GeometryB geometry'
         );
  _postgis_drop_function_if_needed
 ----------------------------------

 (1 row)
 }}}

 This suggests I have no raster tables:
 {{{
 postgres=> SELECT count(1) FROM raster_columns;
  count
 -------
      0
 (1 row)
 }}}

 AWS Suggested I drop the postgis_raster extension, but I get the
 following:
 {{{
 postgres=> DROP EXTENSION postgis_raster;
 ERROR:  extension "postgis_raster" does not exist

 postgres=> select * FROM pg_available_extensions where name like
 '%postgis%';
           name          | default_version | installed_version |
 comment
 ------------------------+-----------------+-------------------+------------------------------------------------------------
  postgis_tiger_geocoder | 3.3.2           | 3.2.3             | PostGIS
 tiger geocoder and reverse geocoder
  postgis_topology       | 3.3.2           | 3.2.3             | PostGIS
 topology spatial types and functions
  postgis                | 3.3.2           | 3.3.2             | PostGIS
 geometry and geography spatial types and functions
  postgis_raster         | 3.3.2           |                   | PostGIS
 raster types and functions
 (4 rows)
 }}}

 So it seems like the upgrade was partially successful?

 I can recreate the DB from the initial failed `select
 postgis_extensions_upgrade();` if you would like me to test anything.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5545#comment:10>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list