Re: problems with pg_restore to 7.3.3 db - Mailing list pgsql-general

From Tom Lane
Subject Re: problems with pg_restore to 7.3.3 db
Date
Msg-id 2062.1057262196@sss.pgh.pa.us
Whole thread Raw
In response to Re: problems with pg_restore to 7.3.3 db  ("andy morrow" <andy.morrow@jinny.ie>)
List pgsql-general
"andy morrow" <andy.morrow@jinny.ie> writes:
>> pg_restore -Fc -d mydblo mydblo_dump
>> pg_restore: [archiver (db)] could not execute query: ERROR:  Load of file
>> /usr/lib/pgsql//plpgsql.so failed: /usr/lib/pgsql//plpgsql.so: undefined
>> symbol: fmgr_pl_finfo

It looks like it's trying to use the 7.1 version of plpgsql.so, which of
course will not work in 7.3.  What you need is to get rid of the
absolute path to plpgsql.so that's in the pg_proc entry, and use a
$libdir-relative path instead, so that you won't have a version-dependent
definition of plpgsql anymore.

-Fc dumps are unfortunately not easy to edit.  The best way to do this
might be to temporarily do (in the old database)

UPDATE pg_proc SET probin = '$libdir/plpgsql' WHERE proname =
'plpgsql_call_handler';

then make another dump file, and then revert the probin setting to what
it was (if you still care about the 7.1 database working; the $libdir
notation was added in 7.2 IIRC).

            regards, tom lane

pgsql-general by date:

Previous
From: "Bruno BAGUETTE"
Date:
Subject: Avoid the interpretation of \n in the psql output
Next
From: "Dan Langille"
Date:
Subject: Re: Are we backwards on the sign of timezones?