[PostGIS] #6142: postgis_topology proper fix for topogeometry corruption
PostGIS
trac at osgeo.org
Mon Oct 5 07:34:40 PDT 2026
#6142: postgis_topology proper fix for topogeometry corruption
----------------------+---------------------------
Reporter: robe | Owner: strk
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.7.1
Component: topology | Version: 3.6.x
Keywords: |
----------------------+---------------------------
As discussed with Andreas on IRC, the changing system catalogs for
topogeom was just sloppy and
https://postgis.net/docs/FixCorruptTopoGeometryColumn.html is a messy
solution to upgrade and corrupting the catalog on upgrade with the
expectation users will run the fix before hand is sloppy.
He proposed add another id attribute to topogeometry type perhaps calling
it id4 or some such thing and running upgrade as part of it.
Two options come to mind which I assume are both possibly
Option 1:
1) rename a int4 id to id4.
2) Create a new id field
3) copy the id4 to id values, copy the values to the new id, and then drop
the id4.
Option 2:
Alternative to that which would not require slow extension upgrade,
Do 1,2 and change functions to use which ever one is populated behind the
scenes.
In theory we wouldn't need to change signatures even in case of option 2,
but that requires a bit more testing and checking.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/6142>
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