[GIS] Migration from postgresql 8.4 to postgresql 9.0, postgis 1.5 involved

postgispostgresql

Im migrating from 8.4 to 9.0, in pg8.4 i have postgis 1.5.1 and in 9.0 im just installed 1.5.2.

I decided to dump the postgis databases before the pg_upgrade command, and delete them, planning to create my new postgis_template and then create the databases:

pg_dump -C -h host -U postgres -f databasegis.dump databasegis
psql -U postgres < databasegis.dump

But I have errors :

ERROR:  could not access file "$libdir/liblwgeom": No such file or directory
ERROR:  function public.st_text(boolean) does not exist

What can i do?

Thanks a lot.

Best Answer

This method worked.

  1. Create a new database.
  2. Install PostGIS 1.5 (the install files should be in share/contrib/postgis-1.5).
  3. Then restore your data on top.
  4. You should then get errors that the functions already exist and they will be skipped. You may get some errors too about the liblwgeom, but those you can ignore since they represent functions long ago deprecated that got taken out of postgis-1.5.
Related Question