[postgis] Upgrading Instructions

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

[postgis] Upgrading Instructions

Paul Ramsey-2
I have added upgrading instructions to the README, since we now have a
user base which might actually be doing so. It is important to dump and
restore your database after an upgrade because Dave is making no
promises about not changing the underlying object structure between
versions (in fact, he did so on Friday while working on the SRIDs and
precision grids). The upgrade instructions are appended below. Note that
the fundamental trick is to dump the tables/indexes only and not the
functions -- a side effect of this is that if you have created any
custom functions yourself for the database, they'll disappear in the
upgrade process. Have your own 'functions.sql' file handy to keep your
own custom functions across upgrades. We recognize that this is fairly
inconvenient: in the case of object structure changes there is no way to
avoid it. For more minor changes, when things stabilize in the future it
might be possible to work up a postgis-upgrade.sql file to use on a
running database (maybe).



UPGRADING:

Upgrading PostGIS can be tricky, because the underlying C libraries
which
support the object types and geometries may have changed between
versions.
To avoid problems when upgrading, you will have to dump all the tables
in your database, destroy the database, create a new one, upload the
new postgis.sql file, then upload your database dump:

        pg_dump -t "*" -f dumpfile.sql yourdatabase
        dropdb yourdatabase
        createdb yourdatabase
        psql -f postgis.sql -d yourdatabase
        psql -f dumpfile.sql -d yourdatabase
        vacuumdb -z yourdatabase



--
      __
     /
     | Paul Ramsey
     | Refractions Research
     | Email: [hidden email]
     | Phone: (250) 885-0632
     \_

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think!
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/PhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[hidden email]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



Reply | Threaded
Open this post in threaded view
|

Re: [postgis] Upgrading Instructions

Paul Ramsey-2
Note to Dave, since you're changing the canonical text format while
added SRIDS and precision grids:

  It is important that a dump of an older PostGIS database be always
uploadable into a newer PostGIS database, otherwise our users will rise
up and march upon us, carrying flaming brands and demanding retribution,
etc etc.

Paul Ramsey wrote:

>
> I have added upgrading instructions to the README, since we now have a
> user base which might actually be doing so. It is important to dump and
> restore your database after an upgrade because Dave is making no
> promises about not changing the underlying object structure between
> versions (in fact, he did so on Friday while working on the SRIDs and
> precision grids). The upgrade instructions are appended below. Note that
> the fundamental trick is to dump the tables/indexes only and not the
> functions -- a side effect of this is that if you have created any
> custom functions yourself for the database, they'll disappear in the
> upgrade process. Have your own 'functions.sql' file handy to keep your
> own custom functions across upgrades. We recognize that this is fairly
> inconvenient: in the case of object structure changes there is no way to
> avoid it. For more minor changes, when things stabilize in the future it
> might be possible to work up a postgis-upgrade.sql file to use on a
> running database (maybe).
>
> UPGRADING:
>
> Upgrading PostGIS can be tricky, because the underlying C libraries
> which
> support the object types and geometries may have changed between
> versions.
> To avoid problems when upgrading, you will have to dump all the tables
> in your database, destroy the database, create a new one, upload the
> new postgis.sql file, then upload your database dump:
>
>         pg_dump -t "*" -f dumpfile.sql yourdatabase
>         dropdb yourdatabase
>         createdb yourdatabase
>         psql -f postgis.sql -d yourdatabase
>         psql -f dumpfile.sql -d yourdatabase
>         vacuumdb -z yourdatabase

--
      __
     /
     | Paul Ramsey
     | Refractions Research
     | Email: [hidden email]
     | Phone: (250) 885-0632
     \_

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Secure your servers with 128-bit SSL encryption! Grab your copy of VeriSign's FREE Guide: "Securing Your Web Site for Business." Get it Now!
http://www.verisign.com/cgi-bin/go.cgi?a=n094442340008000
http://us.click.yahoo.com/n7RbFC/zhwCAA/yigFAA/PhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[hidden email]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



Reply | Threaded
Open this post in threaded view
|

Re: [postgis] Upgrading Instructions

David Blasby-3

> Note to Dave, since you're changing the canonical text format while
> added SRIDS and precision grids:
>
>   It is important that a dump of an older PostGIS database be always
> uploadable into a newer PostGIS database, otherwise our users will rise
> up and march upon us, carrying flaming brands and demanding retribution,
> etc etc.

If you restore a 0.5 database into the CVS version you'll get the same
geometry with a SRID of -1.

dave

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think!
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/PhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[hidden email]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/