[PostGIS] #5983: Data corruption in topology.topoelement and topology.topogeometry after upgrade to 3.6.0

PostGIS trac at osgeo.org
Wed Oct 15 16:55:25 PDT 2025


#5983: Data corruption in topology.topoelement and topology.topogeometry after
upgrade to 3.6.0
-----------------------+---------------------------
  Reporter:  packi     |      Owner:  robe
      Type:  defect    |     Status:  new
  Priority:  blocker   |  Milestone:  PostGIS 3.6.1
 Component:  topology  |    Version:  3.6.x
Resolution:            |   Keywords:
-----------------------+---------------------------
Comment (by robe):

 this seems to rollback the change for topogeometry:


 {{{
 UPDATE pg_catalog.pg_attribute AS n SET atttypid = 'int'::regtype, attlen
 = 4
 FROM  pg_catalog.pg_type
                         join pg_catalog.pg_class on pg_class.oid =
 pg_type.typrelid
                         join pg_catalog.pg_attribute AS pga  on
 pga.attrelid = pg_class.oid
                         join pg_type as pg_attr_type on pg_attr_type.oid =
 pga.atttypid
 WHERE pg_type.typname::regtype::text = 'topogeometry' AND pga.attname =
 'id'
                         AND
                 pg_type.typnamespace::regnamespace::text = 'topology'  AND
 n.attrelid = pga.attrelid
 AND n.attnum = pga.attnum AND  pga.atttypid::regtype::text = 'bigint';

 }}}


 After that my query:


 {{{
 SELECT geometrytype(topo) FROM topo_states;
 }}}



 changes from:

 UNEXPECTED

 to:

 MULTIPOLYGON

 But I haven't checked yet what happens if I had updated records after the
 move.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5983#comment:15>
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