[postgis-users] Restore data from Mac to Windows fails

Barend Köbben kobben at itc.nl
Wed Oct 11 02:57:37 PDT 2006


Hi,

I am trying to restore a database backup up from the Mac-version of PostgreSQL8.1.4+PostGIS1.1.1 to a Windows server installation (same versions),  first by using PGadminII, then by following the pg_dump-pg_restore story in the Postgres manual. I have try many (combinations of) settings, compress, tar, plain, with and without blobs, etc... 

It fails. I first thought it was a general Postgres thing, but it seems the culprit is a PostGIS function, looking at the error message that always comes up :

pg_restore: creating FUNCTION box2d_in(cstring)
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 19; 1255 52517 FUNCTION box2d_in(cstring) root
pg_restore: [archiver (db)] could not execute query: ERROR:  could not access file "$libdir/liblwgeom.1.1.so": No such file or directory
    Command was: CREATE FUNCTION box2d_in(cstring) RETURNS box2d
    AS '$libdir/liblwgeom.1.1.so', 'BOX2DFLOAT4_in'
    LANGUAGE c IMMUTABLE...

The only workaround  I could find was backuing up the schema and data seperately as SQL inserts, then deleting the PostGIS function part from the schema SQL , and running bot in psql... Not very nice. 

Has anybody an idea how to solve it?

PS: I noticed that what the Mac version of PGadminIII calls ENCODING=UNICODE, the Win version calls ENCODING=UTF8. Surely this is just a naming problem, not  the cause...?
--
Barend Köbben
International Institute for Geo-information 
Sciences and Earth Observation (ITC) 
PO Box 6, 7500AA Enschede (The Netherlands)
ph: +31 (0)53 4874253; fax: +31 (0)53 4874335
 



More information about the postgis-users mailing list