pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Davies <sdavies@sdc.com.au>
To: pgsql-admin@postgresql.org
Subject: could not find function "LWGEOM_distance_ellipsoid_point"
Date: Mon, 16 Jul 2012 14:27:45 +0930
Message-ID: <201207161427.45192.sdavies@sdc.com.au> (raw)

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.



view thread (4+ messages)  latest in thread

Message-ID: <201207161427.45192.sdavies@sdc.com.au>
Permalink:  ../201207161427.45192.sdavies@sdc.com.au/
Also on:    postgresql.org/message-id/201207161427.45192.sdavies@sdc.com.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: sdavies@sdc.com.au
  Subject: Re: could not find function "LWGEOM_distance_ellipsoid_point"
  In-Reply-To: <201207161427.45192.sdavies@sdc.com.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox