could not find function "LWGEOM_distance_ellipsoid_point"

From: Stephen Davies <sdavies(at)sdc(dot)com(dot)au>
To: pgsql-admin(at)postgresql(dot)org
Subject: could not find function "LWGEOM_distance_ellipsoid_point"
Date: 2012-07-16 04:57:45
Message-ID: 201207161427.45192.sdavies@sdc.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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';

(I used the rsync method suggested in the last paragraph of the pg_upgrade man
pages to create a copy of the databases to be upgraded.
This works fine except that the paragraph should also point out that the file
postmaster.pid must be deleted from the copy to avoid an error message from
pg_upgrade.)

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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2012-07-16 05:47:08 Re: could not find function "LWGEOM_distance_ellipsoid_point"
Previous Message Craig James 2012-07-11 20:07:59 Re: What happens when PostgreSQL fails to log to SYSLOG