Hi
Please help me here, there was an upgrade done by someone who left the company but there is one database which was not upgraded. The server has several instances running on it but this one instance is still on postgres 7.
I dumped postgres 7 database using pg_dump –Fc on postgres 7 binaries and then attempted pg_restore –Fc (using postgres9.1.9 binaries) which threw out the following errors. Note that postgres 7 is still running on it’s own instance. I am doing this postgres 9 restore on a different port and different instance to get it right first before implementing the change.
ERROR: language "plpgsql" already exists
DETAIL: Proceeding with relation creation anyway.
ERROR: could not access file "$libdir/plperl": No such file or directory
ERROR: function public.plperl_call_handler() does not exist
ERROR: could not access file "$libdir/plperl": No such file or directory
ERROR: language "plperlu" does not exist
Because of the above errors I tried the following
/usr/local/pgsql9/bin/createlang -p59999 plperl template1
createlang: language installation failed: ERROR: could not open extension control file "/usr/local/pgsql9/share/extension/plperl.control": No such file or directory
Then I looked for where extention is located:
~> locate plperl.control
/home/ellerines/pgsql9_upgrade/postgresql-9.1.9/src/pl/plperl/plperl.control
> /home/ellerines/pgsql9_upgrade/postgresql-9.1.9/src/bin
total 44K
-rw-r--r-- 1 1107 1107 658 Apr 1 2013 Makefile
drwxrwxrwx 2 1107 1107 4.0K Apr 1 2013 pgevent
drwxrwxrwx 3 1107 1107 4.0K Aug 18 2013 initdb
drwxrwxrwx 3 1107 1107 4.0K Aug 18 2013 pg_ctl
drwxrwxrwx 3 1107 1107 4.0K Aug 18 2013 pg_dump
drwxrwxrwx 3 1107 1107 4.0K Aug 18 2013 psql
drwxrwxrwx 3 1107 1107 4.0K Aug 18 2013 scripts
drwxrwxrwx 3 1107 1107 4.0K Aug 18 2013 pg_controldata
drwxrwxrwx 3 1107 1107 4.0K Aug 18 2013 pg_config
drwxrwxrwx 3 1107 1107 4.0K Aug 18 2013 pg_resetxlog
drwxrwxrwx 3 1107 1107 4.0K Aug 18 2013 pg_basebackup
How can then do a pg_restore to prevent errors above?
Kind regards,
Khangelani