[postgis-users] Upgrade issues

Regina Obe lr at pcorp.us
Mon Sep 2 16:35:03 PDT 2019


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.

 

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.

 

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.

 

What you could do is drop the offending constraint before you pg_upgrade, and then create it after the upgrade is done.

 

 

 

From: postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of James Sewell
Sent: Sunday, September 1, 2019 10:59 PM
To: postgis-users at lists.osgeo.org
Subject: [postgis-users] Upgrade issues

 

Hi all,

 

I'm upgrading from 9.6 -> 11. Both versions have PostGIS 2.5.1.

 

The upgrade starts then I see this in the logs:

 

pg_restore: [archiver (db)] could not execute query: ERROR:  relation "public.spatial_ref_sys" does not exist
LINE 39:     "location_pt" "public"."geography"(Point,4283),

 

Above this I can see:

 

pg_restore: creating EXTENSION "postgis"

 

This is created fine - it just doesn't make the PostGIS tables in any schema?

 

Has anyone seen anything like this before?

 

Cheers,


James Sewell,

 

 

  _____  

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/20190902/75768a82/attachment.html>


More information about the postgis-users mailing list