[postgis-users] [postgis-devel] Upgrade issues

James Sewell james.sewell at jirotech.com
Wed Feb 19 18:46:08 PST 2025


It looks like this will be triggered for any PG13 -16  pg_upgrade with a
non 4326 geometry column.

I'm having trouble isolating where the error is coming from though ....

-J


On Thu, 6 Feb 2025 at 13:35, James Sewell <james.sewell at jirotech.com> wrote:

> The issue we ran into before when spatial_ref_sys was checked was when
>> there is say an index that uses a ST_Transform or a function used in a
>> table constraint that relies on spatial_ref_sys.
>>
>>
>>
>> In those cases though I think the error was something like can’t find
>> srid 4326  etc.  But the error you have below is that the table
>> public.spatial_ref_sys does not exist or for security reasons it’s not
>> accessible.
>>
>
> If you look at the history in this message it’s the same error message
> from 2019 😀
>
>>
>>
>> Which version of PG13 are you upgrading from (include the minor as well)
>> and the PostGIS minor/micro e.g what this returns
>>
>>
>>
>> SELECT postgis_full_version() || ‘ ‘ || version();
>>
>
> Here you are, thanks for the help!
>
>  POSTGIS="3.4.3 0" [EXTENSION] PGSQL="130" GEOS="3.7.2-CAPI-1.11.2
> b55d2125" SFCGAL="SFCGAL 1.4.1, CGAL 5.4.2, BOOST 1.66.0" PROJ="6.3.2"
> LIBXML="2.9.7" LIB
>
> JSON="0.13.1" LIBPROTOBUF="1.3.0" WAGYU="0.5.0 (Internal)" TOPOLOGY
> PostgreSQL 13.18 (EnterpriseDB Advanced Server 13.18.24) on
> x86_64-pc-linux-gnu, compile
>
> d by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-22), 64-bit
>
> (1 row)
>
> *From:* James Sewell <james.sewell at jirotech.com>
>> *Sent:* Tuesday, February 4, 2025 4:15 PM
>> *To:* PostGIS Users Discussion <postgis-users at lists.osgeo.org>; Bradley
>> Latus <Bradley.Latus at jirotech.com>
>> *Subject:* Re: [postgis-users] [postgis-devel] Upgrade issues
>>
>>
>>
>> This seems to be broken again for pg_upgrade?
>>
>>
>>
>> Upgrading from PG 13 -> 16 and getting the same error as above.
>>
>>
>>
>> ERROR:  relation "public.spatial_ref_sys" does not exist
>>
>>
>>
>> This was fixed here:
>> https://github.com/postgis/postgis/blob/master/postgis/gserialized_typmod.c#L150
>>
>>
>>
>> Could it be the code block added above this since 2019? The issue was
>> PostGIS reading pg_spatial_ref_sys before it's populated in a pg_upgrade.
>>
>>
>>
>> Cheers,
>>
>> James
>>
>>
>>
>>
>>
>>
>> ------------------------------
>>
>> The contents of this email are confidential and may be subject to legal
>> or professional privilege and copyright. No representation is made that
>> this email is free of viruses or other defects. If you have received this
>> communication in error, you may not copy or distribute any part of it or
>> otherwise disclose its contents to anyone. Please advise the sender of your
>> incorrect receipt of this correspondence.
>>
> --
> James Sewell,
> *Chief Architect, Jirotech*
> Suite 46, Jones Bay Wharf, 26-32 Pirrama Road, Pyrmont NSW 2009
> *P *(+61) 2 8099 9000 <(+61)%202%208099%209000>  *W* www.jirotech.com
> *F *(+61) 2 8099 9099 <(+61)%202%208099%209000>
>

-- 
The contents of this email are confidential and may be subject to legal or 
professional privilege and copyright. No representation is made that this 
email is free of viruses or other defects. If you have received this 
communication in error, you may not copy or distribute any part of it or 
otherwise disclose its contents to anyone. Please advise the sender of your 
incorrect receipt of this correspondence.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20250220/7920b447/attachment.htm>


More information about the postgis-users mailing list