<div dir="ltr">Sadly that's not the case - the issue is with the actual Geometry column.<div><br></div><div><font face="monospace">ERROR: relation "public.spatial_ref_sys" does not exist<br>LINE 21: location_pt public.geography(Point,4283),</font></div><div><font face="monospace"><br></font></div><div>I'm curious how this ever worked?</div><div><br><div><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 color="#323b62"><span style="font-size:14px"><b>James</b></span></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 3 Sep 2019 at 09:35, Regina Obe <<a href="mailto:lr@pcorp.us">lr@pcorp.us</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_2329413130016933507WordSection1"><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">I recall Raúl mentioning he triggered this. I think he had something like a table constraint on ST_Buffer(geog.. ) or some other function that internally relies on spatial_ref_sys.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">The issue is that since spatial_ref_sys is a table, pg_upgrade doesn’t populate before it populates other tables. pg_upgrade first makes the structure of all the tables and pg_upgrade doesn’t know it needs to populate the data in spatial_ref_sys before the other tables as it does a create extensions in non-standard way when migrating the data to maintain same exact functions/data etc as it had before.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">I thought we fixed this issue like in 2.5.3, but I I can’t find the bug fix notice in the notices, so maybe not. I also can’t remember what ticket it was but I think it is ticketed.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">What you could do is drop the offending constraint before you pg_upgrade, and then create it after the upgrade is done.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span style="font-size:11pt;font-family:Calibri,sans-serif"> postgis-users [mailto:<a href="mailto:postgis-users-bounces@lists.osgeo.org" target="_blank">postgis-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>James Sewell<br><b>Sent:</b> Sunday, September 1, 2019 10:59 PM<br><b>To:</b> <a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br><b>Subject:</b> [postgis-users] Upgrade issues<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Hi all,<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I'm upgrading from 9.6 -> 11. Both versions have PostGIS 2.5.1.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">The upgrade starts then I see this in the logs:<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">pg_restore: [archiver (db)] could not execute query: ERROR: relation "public.spatial_ref_sys" does not exist<br>LINE 39: "location_pt" "public"."geography"(Point,4283),</span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="font-family:Arial,sans-serif">Above this I can see:</span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">pg_restore: creating EXTENSION "postgis"</span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">This is created fine - it just doesn't make the PostGIS tables in any schema?<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Has anyone seen anything like this before?<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"><br>James Sewell,<u></u><u></u></p></div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><p class="MsoNormal"><u></u> <u></u></p><div class="MsoNormal" align="center" style="text-align:center"><hr size="3" width="100%" noshade style="color:rgb(34,34,34)" 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>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></blockquote></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>