Dealing with topology data corruption on upgrade to 3.6.0
Regina Obe
lr at pcorp.us
Wed Oct 15 12:11:00 PDT 2025
> The 3.6.0 release introduced a bug that results in data corruption:
> https://trac.osgeo.org/postgis/ticket/5983
>
> This means that whoever upgraded to 3.6.0 while having topology data is now
> in a data-corruption state and any update to their data will make the situation
> worse beacuse they would end up with a mix of valid and invalid rows.
>
> It would be nice if the proponent of the change which introduced the problem
> (in Cc) would partecipate in the effort of providing a fix for it, and I hope we
> won't repeat the mistake of accepting contributions before all issues raised
> during review are addressed [1]
>
> [1] https://gitea.osgeo.org/postgis/postgis/pulls/242#issuecomment-13471
>
> I think this should be announced to the users because as the damage could be
> mitigated by restoring a backup into a 3.5.x version until we find a solution.
>
>
> --strk;
>
> Libre GIS consultant/developer 🎺
> https://strk.kbt.io/services.html
We are chatting about this in IRC/matrix. I'm thinking of a plan that will work as follows to fix.
1) roll back the catalog updates, that should fix existing installs without having to restore from a huge backup
2) Rename the existing domain and topogeometry type - something like topogeometry_small
3) Create new types (with the existing name, topogeometry, topoelement etc).
4) Put in autocasts to topogeometry_small -> topogeometry
Unfortunately all this kinda breaks our rule of no new functions or types in a micro, but I don't see how we have much choice here.
Thanks,
Regina
More information about the postgis-devel
mailing list