Search Postgresql Archives

Re: [postgis-users] postgresql8.0 and postgis1.0.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Pitesh,

strk@xxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxx | www.logi-track.com

Attachment: dump_split.sh
Description: application/shellscript

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux