[PostGIS] #5899: pg_upgrade fails restore geography because spatial_ref_sys does not exist
PostGIS
trac at osgeo.org
Sat May 17 20:30:05 PDT 2025
#5899: pg_upgrade fails restore geography because spatial_ref_sys does not exist
----------------------+---------------------------
Reporter: robe | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.2.9
Component: postgis | Version: 3.4.x
Resolution: | Keywords:
----------------------+---------------------------
Comment (by robe):
Replying to [comment:3 pramsey]:
> Does the dependency entry trick not work? geography type depending on
spatial_ref_sys?
No it doesn't because the spatial_ref_sys table is still not loaded before
user data.
I didn't test myself, but Jeevan, confirmed here
https://lists.osgeo.org/pipermail/postgis-devel/2025-May/030532.html
snippet from email
----
Thank you, Regina
You’re right -- this dependency alone doesn't fully resolve the issue.
We did receive a complaint about missing data in the spatial_ref_sys
table,
with the error:
ERROR: Cannot find SRID (4283) in spatial_ref_sys.
By tweaking pg_dump, we managed to dump data for this table *before* any
user tables accessed it. However, we later encountered a new issue:
ERROR: relation "public.spatial_ref_sys" does not exist.
----
The ERROR: Cannot find SRID (4283) in spatial_ref_sys.I suspect is the
first error they encountered. Which is the issue we ran into with #4405.
I don't quite understand the second comment though, unless the relation
"public.spatial_ref_sys" does not exist error happens because they tried
to dump the spatial_ref_sys data before the spatial_ref_sys table was
created.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5899#comment:4>
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