[PostGIS] #5983: Data corruption in topology.topoelement and topology.topogeometry after upgrade to 3.6.0
PostGIS
trac at osgeo.org
Thu Oct 30 07:09:24 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):
Ah strk - sorry didn't read this before posting my pull request
https://gitea.osgeo.org/postgis/postgis/pulls/274
I tried to make the function name match the structure of other function
names.
So I called it: topology.FixCorruptTopoGeometryColumn
We could add a version number to it, but I had planned it work for both
upgrade and downgrade. e.g. should we offer the option of
topogeometry_small we might need to use it to fix the bigint
topogeometries that's what the second casing is for.
Regarding the above you have. I realize now that even though you can't
cast xmin to int or bigint you could do so by going first thru ::text
cast.
{{{
select xmin::text::integer from pg_proc where oid =
'topology.st_createtopogeo'::regproc;
}}}
So I guess it can be done. Though are we absolutely sure that xmin will
always be increasing? I'm guessing so except for exceedingly large
databases where there is wrap around. I'm assuming that is why they never
provided > < operators for tid types and you only have equality.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5983#comment:26>
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