[postgis-users] postgresql8.0 and postgis1.0.0
Markus Schaber
schabios at logi-track.com
Thu Feb 17 03:26:12 PST 2005
Hi, Pitesh,
strk at refractions.net schrieb:
> You can't simply restore a dump to upgrade postgis
> for two reasons:
>
> 1) postgis library name might have changed (this is the case).
> 2) postgis procedural language function might be changed
> and you'd get the old ones.
>
> You can find an utility script in the utils/ directory (postgis_restore.pl)
> which would extract from a custom format dump (pg_dump -Fc) all
> but postgis objects and restore them after having enabled a database
> with new postgis objects. This is currently the preferred method
> for upgrade, but has not been widely tested.
For large databases, the attached Script (or a variation of it) may be
helpful for it. It separates schema and data dumps. If you have large
databases, only the relatively small schema dump has to be ran through
the converter, all other (potentially very large) data dumps can simply
be restored via psql. The spatial_ref_sys data dump should be completely
replaced by the spatial_ref_sys.sql coming with PostGIS.
It may also help to split of all the index creations of the schema dump
into a separate file.
The whole restore procedure should following the lines of:
- create new database
- install postgis into database, including spatial_ref_sys.sql
- install the schema dump via postgis_restore.pl
- install the geometry_columns dump (and manually drop the obsolete
columns afterwards).
- install all other dumps via psql.
HTH,
Markus
--
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios at logi-track.com | www.logi-track.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dump_split.sh
Type: application/x-shellscript
Size: 1274 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050217/a566e109/attachment.bin>
More information about the postgis-users
mailing list