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

From: Markus Schaber <schabios(at)logi-track(dot)com>
To: PostGIS Users Discussion <postgis-users(at)postgis(dot)refractions(dot)net>
Cc: pgsql-general(at)postgresql(dot)org, Pritesh Shah <pritesh(dot)krish(at)gmail(dot)com>
Subject: Re: [postgis-users] postgresql8.0 and postgis1.0.0
Date: 2005-02-17 11:26:12
Message-ID: 42147F54.1030702@logi-track.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi, Pitesh,

strk(at)refractions(dot)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(dot)com | www.logi-track.com

Attachment Content-Type Size
dump_split.sh application/x-shellscript 1.2 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message alexandre::aldeia digital 2005-02-17 12:14:15 Killing process through of a function
Previous Message AL ELK 2005-02-17 10:18:48 diff value retuns, debug mode and play mode