[postgis] Upgrading Instructions

Paul Ramsey pramsey at refractions.net
Sun Jul 29 10:30:03 PDT 2001

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 PostGIS can be tricky, because the underlying C libraries
support the object types and geometries may have changed between
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: pramsey at refractions.net
     | Phone: (250) 885-0632

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think!

To unsubscribe from this group, send an email to:
postgis-unsubscribe at yahoogroups.com


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

More information about the postgis-users mailing list