[postgis-users] postgresql8.0 and postgis1.0.0
strk at refractions.net
strk at refractions.net
Wed Feb 16 01:32:17 PST 2005
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.
The alternative is first installing/enabling the new postgis code
and then restore the dump. This second choice will show you lots
of errors due to attempts at restoring objects that will already be
present in the database (added by new postgis enabling). Note that
doing so will also leave in dthe resulting database functions that
might have been obsoleted by newer postgis.
I suggest you try the postgis_upgrade.pl and report any problem
On Wed, Feb 16, 2005 at 02:09:11AM -0700, Pritesh Shah wrote:
> I'm trying to backup a server and restore it on a different machine
> with newer versions of postgresql and postgis. Dumps have been created
> for the following versions from the old database server:
> Postgresql 7.4.6
> Postgis 0.8.2
> Now since both the packages have released newer versions i've
> installed the following on my newer machine where i would like to
> restore the dumped databases.
> Postgresql 8.0.1 and
> Postgis 1.0.0
> For restoring the information i'm using
> psql -e -f abc.sql template1
> While restoring the dumps i've collected the following information
> where the problem occurs:
> CREATE FUNCTION histogram2d_in(cstring) RETURNS histogram2d
> AS '$libdir/libpostgis.so.0.8', 'histogram2d_in'
> LANGUAGE c STRICT;
> psql:abc.sql:3947: ERROR: could not access file
> "$libdir/libpostgis.so.0.8": No such file or directory
> I understand that this is due to the following:
> libpostgis.so.8.0 is now liblwgeom.so.1.0 and also
> histogram2d_in is now lwhistogram2d_in
> histogram2d_out is now lwhistogram2d_out and so on.
> Now my problem is there are a lot of databases that use the postgis
> stuff (like the histogram2d_in) which has changed from the older
> version to the newer version. What do i do to overcome this problem??
> Can somebody help me out with this??
> postgis-users mailing list
> postgis-users at postgis.refractions.net
More information about the postgis-users