Upgrading

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Upgrading

Robert Inder
We have a number of databases (one per client) that use PostGIS.
They run on Centos 6.8 machines, Postgres 9.4, PostGIS 2.1.8.

Yum has just brought us PostGIS 2.2.5, and I am preparing to do the upgrade.

When I let yum upgrade the server to 2.2, the existing databases continue to use 2.1.
As I'd hope/expect.

BUT...

The instructions on http://postgis.net/install tell me that to upgrade PostGIS, I should say...
   ALTER EXTENSION postgis UPDATE;
When I do this, "SELECT PostGIS_full_version();" tells me the database is using PostGIS 2.2.5.

But if I then back up the database, by doing a dump to SQL, the resulting files still has many blocks like...

    CREATE FUNCTION addbbox(geometry) RETURNS geometry
        LANGUAGE c IMMUTABLE STRICT
        AS '$libdir/postgis-2.1', 'LWGEOM_addBBOX';

That "2.1" doesn't seem right.
Has something gone wrong without me noticing? 
Is there something else I need to do?

ALSO...

If, after I have updated the server,  I restore a pre-update backup (dropdb -> createdb -> load the SQL dump)
I get a database that is using 2.2. 
It works.  But I'm worried that restoring the backup has not got me back to where I started.

Robert.





















--
Robert Inder,                                    0131 229 1052 / 07808 492 213
Interactive Information Ltd,   3, Lauriston Gardens, Edinburgh EH3 9HH
Registered in Scotland, Company no. SC 150689
                                           Interactions speak louder than words

_______________________________________________
postgis-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading

Robert Inder
I think I have found the answer.

We have loaded "legacy.sql". 
As shipped with version 2.1, this defines various functions in terms of entry points in postgis-2.1.so.

Those definitions are not part of the PostGIS extension, and so they are not affected by updating it.
So they continue to reference postgis-2.1...

I think we might be able to fix this by running  'uninstall_legacy.sql' and then running
'legacy.sql' from PostGIS 2.2.

But in fact, we're going to fix our system so that we no longer need the legacy functions...

Robert.


On 3 June 2017 at 15:54, Robert Inder <[hidden email]> wrote:
We have a number of databases (one per client) that use PostGIS.
They run on Centos 6.8 machines, Postgres 9.4, PostGIS 2.1.8.

Yum has just brought us PostGIS 2.2.5, and I am preparing to do the upgrade.

When I let yum upgrade the server to 2.2, the existing databases continue to use 2.1.
As I'd hope/expect.

BUT...

The instructions on http://postgis.net/install tell me that to upgrade PostGIS, I should say...
   ALTER EXTENSION postgis UPDATE;
When I do this, "SELECT PostGIS_full_version();" tells me the database is using PostGIS 2.2.5.

But if I then back up the database, by doing a dump to SQL, the resulting files still has many blocks like...

    CREATE FUNCTION addbbox(geometry) RETURNS geometry
        LANGUAGE c IMMUTABLE STRICT
        AS '$libdir/postgis-2.1', 'LWGEOM_addBBOX';

That "2.1" doesn't seem right.
Has something gone wrong without me noticing? 
Is there something else I need to do?

ALSO...

If, after I have updated the server,  I restore a pre-update backup (dropdb -> createdb -> load the SQL dump)
I get a database that is using 2.2. 
It works.  But I'm worried that restoring the backup has not got me back to where I started.

Robert.





















--
Robert Inder,                                    <a href="tel:0131%20229%201052" value="+441312291052" target="_blank">0131 229 1052 / <a href="tel:07808%20492213" value="+447808492213" target="_blank">07808 492 213
Interactive Information Ltd,   3, Lauriston Gardens, Edinburgh EH3 9HH
Registered in Scotland, Company no. SC 150689
                                           Interactions speak louder than words



--
Robert Inder,                                    0131 229 1052 / 07808 492 213
Interactive Information Ltd,   3, Lauriston Gardens, Edinburgh EH3 9HH
Registered in Scotland, Company no. SC 150689
                                           Interactions speak louder than words

_______________________________________________
postgis-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-users