<div><div dir="auto">I will do some more testing today to make sure it’s not PG or POSTGIS version dependent - but yes to both at this stage.</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 4 Sep 2019 at 12:42 am, Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca">pramsey@cleverelephant.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> On Sep 3, 2019, at 6:20 AM, Regina Obe <<a href="mailto:lr@pcorp.us" target="_blank">lr@pcorp.us</a>> wrote:<br>
> <br>
> Oh didn’t think of that one.  That ‘s a bummer.  PostGIS has supported other long/lat spatial ref sys since PostGIS 2.2.<br>
> I think if you use anything other than 4326 though it has to look in the spatial_ref_sys table for some things.  I’m guessing it’s checking to make sure 4283 is a valid entry in spatial_ref_sys.<br>
>  <br>
> I’m not sure why it doesn’t need to check for geometry or maybe we just never bother since geometry if you can’t transform it is not a huge deal and things like 0 srid aren’t in the spatial_ref_sys anyway.<br>
>  <br>
> Paul – any thoughts on how to fix this one?<br>
<br>
None. Is it easily replicable? Does any non-standard geography srid trigger it?<br>
<br>
P<br>
<br>
>  <br>
> Thanks,<br>
> Regina<br>
>  <br>
>  <br>
> From: postgis-users [mailto:<a href="mailto:postgis-users-bounces@lists.osgeo.org" target="_blank">postgis-users-bounces@lists.osgeo.org</a>] On Behalf Of James Sewell<br>
> Sent: Monday, September 2, 2019 8:32 PM<br>
> To: PostGIS Users Discussion <<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a>><br>
> Subject: Re: [postgis-users] Upgrade issues<br>
>  <br>
> Sadly that's not the case - the issue is with the actual Geometry column.<br>
>  <br>
> ERROR:  relation "public.spatial_ref_sys" does not exist<br>
> LINE 21:     location_pt public.geography(Point,4283),<br>
>  <br>
> I'm curious how this ever worked?<br>
>  <br>
> James<br>
>  <br>
> On Tue, 3 Sep 2019 at 09:35, Regina Obe <<a href="mailto:lr@pcorp.us" target="_blank">lr@pcorp.us</a>> wrote:<br>
>> 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.<br>
>>  <br>
>> 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.<br>
>>  <br>
>> 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.<br>
>>  <br>
>> What you could do is drop the offending constraint before you pg_upgrade, and then create it after the upgrade is done.<br>
>>  <br>
>>  <br>
>>  <br>
>> From: postgis-users [mailto:<a href="mailto:postgis-users-bounces@lists.osgeo.org" target="_blank">postgis-users-bounces@lists.osgeo.org</a>] On Behalf Of James Sewell<br>
>> Sent: Sunday, September 1, 2019 10:59 PM<br>
>> To: <a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
>> Subject: [postgis-users] Upgrade issues<br>
>>  <br>
>> Hi all,<br>
>>  <br>
>> I'm upgrading from 9.6 -> 11. Both versions have PostGIS 2.5.1.<br>
>>  <br>
>> The upgrade starts then I see this in the logs:<br>
>>  <br>
>> 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),<br>
>>  <br>
>> Above this I can see:<br>
>>  <br>
>> pg_restore: creating EXTENSION "postgis"<br>
>>  <br>
>> This is created fine - it just doesn't make the PostGIS tables in any schema?<br>
>>  <br>
>> Has anyone seen anything like this before?<br>
>>  <br>
>> Cheers,<br>
>> <br>
>> James Sewell,<br>
>>  <br>
>>  <br>
>> 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.<br>
>> _______________________________________________<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><br>
>  <br>
> 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.<br>
> _______________________________________________<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><br>
<br>
_______________________________________________<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></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">James Sewell,<br>Chief Architect<br><br>Suite 112, Jones Bay Wharf, 26-32 Pirrama Road, Pyrmont NSW 2009<br>P (+61) 2 8099 9000  W <a href="http://www.jirotech.com">www.jirotech.com</a>  F (+61) 2 8099 9099</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>