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

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: [postgis-users] postgresql8.0 and postgis1.0.0
Дата
Msg-id 42147F54.1030702@logi-track.com
обсуждение исходный текст
Ответ на Re: [postgis-users] postgresql8.0 and postgis1.0.0  (strk@refractions.net)
Список pgsql-general
Hi, Pitesh,

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

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: "ALÝ ÇELÝK"
Дата:
Сообщение: diff value retuns, debug mode and play mode
Следующее
От: "alexandre::aldeia digital"
Дата:
Сообщение: Killing process through of a function