[postgis-users] Upgrading

Robert Inder robert at interactive.co.uk
Mon Jun 5 15:47:50 PDT 2017


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 <robert at interactive.co.uk> 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,                                    0131 229 1052 / 07808
> 492 213 <07808%20492213>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20170605/86480866/attachment.html>


More information about the postgis-users mailing list