[postgis-users] could not find function "LWGEOM_distance_ellipsoid_point"

Stephen Davies sdavies at sdc.com.au
Sun Jul 15 17:57:12 PDT 2012


Greetings.

I am trying to upgrade a PostgreSQL/PostGIS database from 8.4.0 to 0.1.4 using 
pg_upgrade.

The "active check" run of pg_upgrade was successful but when I try the real 
thing, I get:

-bash-4.1$ /usr/local/pgsql/bin/pg_upgrade -b /usr/bin -B /usr/local/pgsql/bin  
-d /data1/copy/data -D /data1/pgsql914/data -k -l /tmp/pg_log
Performing Consistency Checks
-----------------------------
Checking current, bin, and data directories                 ok
Checking cluster versions                                   ok
Checking database user is a superuser                       ok
Checking for prepared transactions                          ok
Checking for reg* system oid user data types                ok
Checking for contrib/isn with bigint-passing mismatch       ok
Checking for large objects                                  ok
Creating catalog dump                                       ok
Checking for prepared transactions                          ok
Checking for presence of required libraries                 ok

| If pg_upgrade fails after this point, you must
| re-initdb the new cluster before continuing.
| You will also need to remove the ".old" suffix
| from /data1/copy/data/global/pg_control.old.

Performing Upgrade
------------------
Adding ".old" suffix to old global/pg_control               ok
Analyzing all rows in the new cluster                       ok
Freezing all rows on the new cluster                        ok
Deleting new commit clogs                                   ok
Copying old commit clogs to new server                      ok
Setting next transaction id for new cluster                 ok
Resetting WAL archives                                      ok
Setting frozenxid counters in new cluster                   ok
Creating databases in the new cluster                       ok
Adding support functions to new cluster                     ok
Restoring database schema to new cluster                    
psql:/data1/pgsql840/pg_upgrade_dump_db.sql:52010: ERROR:  could not find 
function "LWGEOM_distance_ellipsoid_point" in file "/usr/lib/liblwgeom.so"

There were problems executing "/usr/local/pgsql/bin/psql" --set 
ON_ERROR_STOP=on --no-psqlrc --port 5432 --username "postgres" -f 
"/data1/pgsql840/pg_upgrade_dump_db.sql" --dbname template1 >> "/tmp/pg_log"
Failure, exiting

Lines 52004 to  52010 in pg_upgrade_dump_db.sql are:

--
-- Name: distance_spheroid(geometry, geometry, spheroid); Type: FUNCTION; 
Schema: public; Owner: postgres
--

CREATE FUNCTION distance_spheroid(geometry, geometry, spheroid) RETURNS double 
precision
    LANGUAGE c IMMUTABLE STRICT
    AS '/usr/lib/liblwgeom', 'LWGEOM_distance_ellipsoid_point';

-- 
=============================================================================
Stephen Davies Consulting P/L                           Phone: 08-8177 1595
Adelaide, South Australia.                                Mobile:040 304 0583
Records & Collections Management.



More information about the postgis-users mailing list