Re: problems with pg_restore to 7.3.3 db

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "andy morrow" <andy(dot)morrow(at)jinny(dot)ie>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: problems with pg_restore to 7.3.3 db
Date: 2003-07-03 19:56:36
Message-ID: 2062.1057262196@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"andy morrow" <andy(dot)morrow(at)jinny(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message elein 2003-07-03 19:56:43 Re: Are we backwards on the sign of timezones?
Previous Message scott.marlowe 2003-07-03 19:56:08 Re: [HACKERS] Are we backwards on the sign of timezones?