<div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word"><div><p class="MsoNormal"><span style="font-size:11.0pt">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.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">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.</span></p></div></div></blockquote><div dir="auto"><br></div><div dir="auto">If you look at the history in this message it’s the same error message from 2019 😀</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word"><div><p class="MsoNormal" dir="auto"><span style="font-size:11.0pt"><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">Which version of PG13 are you upgrading from (include the minor as well) and the PostGIS minor/micro e.g what this returns <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">SELECT postgis_full_version() || ‘ ‘ || version();</span></p></div></div></blockquote><div dir="auto"><br></div></div><div><div dir="auto">Here you are, thanks for the help! </div><div dir="auto"><br></div><div dir="auto"><p style="margin:0px;font-style:normal;font-variant-caps:normal;font-stretch:normal;line-height:normal;font-family:"Times New Roman";font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(32,33,36)"><span style="color:rgb(60,64,67);font-family:Courier;font-size:22px"> 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</span><br></p>
<p style="margin:0px 0px 0px 16px;font-style:normal;font-variant-caps:normal;font-stretch:normal;font-size:22px;line-height:normal;font-family:Courier;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(60,64,67)"><span style="font-kerning:none">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</span></p>
<p style="margin:0px 0px 0px 16px;font-style:normal;font-variant-caps:normal;font-stretch:normal;font-size:22px;line-height:normal;font-family:Courier;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(60,64,67)"><span style="font-kerning:none">d by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-22), 64-bit</span></p>
<p style="margin:0px 0px 0px 16px;font-style:normal;font-variant-caps:normal;font-stretch:normal;font-size:22px;line-height:normal;font-family:Courier;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(60,64,67)"><span style="font-kerning:none">(1 row)</span></p><div dir="auto"><span style="font-kerning:none"><br></span></div></div></div><div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word"><div><p class="MsoNormal" dir="auto"><span style="font-size:11.0pt"><u></u><u></u></span></p></div></div><div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word"><div><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><div><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> James Sewell <<a href="mailto:james.sewell@jirotech.com" target="_blank">james.sewell@jirotech.com</a>> <br><b>Sent:</b> Tuesday, February 4, 2025 4:15 PM<br><b>To:</b> PostGIS Users Discussion <<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a>>; Bradley Latus <<a href="mailto:Bradley.Latus@jirotech.com" target="_blank">Bradley.Latus@jirotech.com</a>><br><b>Subject:</b> Re: [postgis-users] [postgis-devel] Upgrade issues<u></u><u></u></span></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><div><div><p class="MsoNormal">This seems to be broken again for pg_upgrade?<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Upgrading from PG 13 -> 16 and getting the same error as above. <u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in"><p class="MsoNormal">ERROR:  relation "public.spatial_ref_sys" does not exist<u></u><u></u></p></blockquote><div><p class="MsoNormal"><u></u> <u></u></p></div></div><div><p class="MsoNormal">This was fixed here: <a href="https://github.com/postgis/postgis/blob/master/postgis/gserialized_typmod.c#L150" target="_blank">https://github.com/postgis/postgis/blob/master/postgis/gserialized_typmod.c#L150</a><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">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.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Cheers,<u></u><u></u></p></div><div><p class="MsoNormal">James<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p></div></div><div><div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div><p class="MsoNormal"><u></u> <u></u></p><div class="MsoNormal" align="center" style="text-align:center"><hr size="2" width="100%" noshade style="color:#222222" align="center"></div><p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:gray">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.</span><u></u><u></u></p></div></div></div></blockquote></div></div>
</div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-size:small"><span style="color:rgb(50,59,98);font-family:Arial,Helvetica,sans-serif;font-size:14px;font-weight:bold">James Sewell,</span><br></div><div style="font-size:14px;color:rgb(184,39,106);font-stretch:normal;font-family:Arial,Helvetica,sans-serif"><span style="color:rgb(169,169,169)"><span style="font-stretch:normal;font-size:12px"><b>Chief Architect, Jirotech</b></span></span></div><div style="font-stretch:normal;font-family:Arial,Helvetica,sans-serif"><span style="color:rgb(153,153,153);font-size:12px">Suite 46, Jones Bay Wharf, 26-32 Pirrama Road, Pyrmont NSW 2009</span><br></div><div style="font-size:small;font-stretch:normal;margin:0px"><font color="#999999"><strong style="font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:20px">P </strong><font face="Arial, Verdana, sans-serif"><span style="font-size:12px;line-height:20px"><a href="tel:(+61)%202%208099%209000" value="+61280999000" style="color:rgb(17,85,204)" target="_blank">(+61) 2 8099 9000</a></span></font><span style="font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:20px"> </span><strong style="font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:20px"> </strong><span style="font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:20px"><span style="width:15px;display:inline-block"><strong>W</strong></span></span><font face="Arial, Helvetica, sans-serif"><span style="font-size:12px;line-height:20px"> </span></font><a href="http://www.jirotech.com/" style="color:rgb(17,85,204);font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:20px;margin:2px 0px" target="_blank">www.jirotech.com</a><font face="Arial, Helvetica, sans-serif"><span style="font-size:12px;line-height:20px">  </span></font><span style="font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:20px"><span style="width:15px;display:inline-block"><strong>F </strong></span></span><a href="tel:(+61)%202%208099%209000" style="color:rgb(17,85,204)" target="_blank"><span style="font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:20px"><span style="font-family:Arial,Verdana,sans-serif">(+61) </span></span><font face="Arial, Verdana, sans-serif"><span style="font-size:12px;line-height:20px">2 8099 9099</span></font></a></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>

<br>
<hr style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14.5455px;line-height:normal"><font size="1" color="Gray" face="Arial" style="line-height:normal">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.</font>