Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XEFbb-0004EJ-Nu for pgsql-admin@arkaria.postgresql.org; Mon, 04 Aug 2014 10:35:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XEFbb-0002SJ-77 for pgsql-admin@arkaria.postgresql.org; Mon, 04 Aug 2014 10:35:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XEFba-0002SD-C5 for pgsql-admin@postgresql.org; Mon, 04 Aug 2014 10:35:02 +0000 Received: from eu1sys200aog115.obsmtp.com ([207.126.144.139]) by magus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XEFbV-0000mV-It for pgsql-admin@postgresql.org; Mon, 04 Aug 2014 10:35:01 +0000 Received: from mail-pd0-f178.google.com ([209.85.192.178]) (using TLSv1) by eu1sys200aob115.postini.com ([207.126.147.11]) with SMTP ID DSNKU99hz2rcPRfgGzovNRvbqYQt5rRvPXxL@postini.com; Mon, 04 Aug 2014 10:34:57 UTC Received: by mail-pd0-f178.google.com with SMTP id w10so9502532pde.9 for ; Mon, 04 Aug 2014 03:34:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:thread-index:date:message-id :subject:to:content-type; bh=cNY4AWvLK41CFsDnaFfIzWYNbQYAs36zPsFKUZZ2KZw=; b=Oj0n78vmCsHf393UIO7++WtjOlDHKoo15mdsuodOdTlGOOhxb9AXwkVgVvh4R85h5i +bSO0vijrQF3mGY2ZMu/SG+UOH7G/9eszBzuEnHk6hBVu7KRr6mfw08b/HUOfGR4feyE SRWupJcOXdI3tjB/EsdJ43dVtXZU11wEgT9umgRmmzp62YmXOKSdiE4WpIqma/5ufq0m KyQAVtmmpFAKek33eOV6Jw9bCYAXsMvBNhzeggEhmn5Ewgf2usMpm6UUn9bmIOJanAGl l9XwCgqrUQ7/R4J8y4Zq+hlHfsJ0USq6lcuXylyLJldHpI9B0lw7cRbFiZrmRzdr/wS2 WNYA== X-Gm-Message-State: ALoCoQmZiphgbYzlh6UqajlAKImFablGpusZ2cCR3iXwSLygKiHgWu+u9fx3aAx/IrC3vdYaIhCFBYRMMAh7TfkFGtNpRhzXzsH9z4LXvaT0CvaMcuJnMLntAeJO15czPwU1HRA2KB6xRRM5FHo0frqT6noMOQmOfg== X-Received: by 10.68.163.100 with SMTP id yh4mr2484861pbb.122.1407148493905; Mon, 04 Aug 2014 03:34:53 -0700 (PDT) X-Received: by 10.68.163.100 with SMTP id yh4mr2484829pbb.122.1407148493559; Mon, 04 Aug 2014 03:34:53 -0700 (PDT) From: Khangelani Gama MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac+vz11LwJVP4ePUQzirNJuayY1JmQ== Date: Mon, 4 Aug 2014 12:34:52 +0200 Message-ID: Subject: upgrading postgres 7.3.4 to 9.1.9 To: pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary=047d7ba96d941af77a04ffcb4aeb X-Pg-Spam-Score: -4.2 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --047d7ba96d941af77a04ffcb4aeb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 =E2=80=93Fc on postgres 7 binari= es and then attempted pg_restore =E2=80=93Fc (using postgres9.1.9 binaries) which = threw out the following errors. Note that postgres 7 is still running on it=E2=80= =99s 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.contro= l > /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 CONFIDENTIALITY NOTICE The contents of and attachments to this e-mail are intended for the addre= ssee only, and may contain the confidential information of Argility (Proprietary) Limited and/or its subsidiaries. An= y review, use or dissemination thereof by anyone other than the intended addressee is prohibited.If you are not the intend= ed addressee please notify the writer immediately and destroy the e-mail. Argility (Proprietary) Limited and its subsidiari= es distance themselves from and accept no liability for unauthorised use of their e-mail facilities or e-mails sent other tha= n strictly for business purposes. =0D --047d7ba96d941af77a04ffcb4aeb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi

= =C2=A0

Please help me here, there was an upgrade = done by someone who left the company but there is one database which was no= t upgraded. The server has several instances running on it but this one ins= tance is still on postgres 7.

=C2=A0

I dumped postgres 7 d= atabase using pg_dump =E2=80=93Fc on postgres 7 binaries and then attempted= pg_restore =E2=80=93Fc (using postgres9.1.9 binaries) which threw out the = following errors. Note that postgres 7 is still running on it=E2=80=99s own= instance. I am doing this postgres 9 restore on a different port and diffe= rent instance to get it right first before implementing the change.<= /p>

=C2=A0

ERROR:=C2=A0 language= "plpgsql" already exists

DETAIL:=C2=A0 Proceeding with relation creation = anyway.

ERROR:=C2=A0 could = not access file "$libdir/plperl": No such file or directory

ERROR:=C2=A0 f= unction public.plperl_call_handler() does not exist

ERROR:=C2=A0 could = not access file "$libdir/plperl": No such file or directory

ERROR:=C2=A0 l= anguage "plperlu" does not exist

=C2=A0

=C2=A0

Because of the above er= rors I tried the following

=C2=A0

/usr/local/pgsql9/bin= /createlang -p59999 plperl template1

=C2=A0

createlang: languag= e installation failed: ERROR:=C2=A0 could not open extension control file &= quot;/usr/local/pgsql9/share/extension/plperl.control": No such file o= r directory

=C2=A0

Then I looked for whe= re extention is located:

=C2=A0

=C2=A0

~> locate plperl.c= ontrol

/h= ome/ellerines/pgsql9_upgrade/postgresql-9.1.9/src/pl/plperl/plperl.control<= /span>

=C2=A0

=C2=A0

=C2=A0

=C2=A0

> /home/ellerine= s/pgsql9_upgrade/postgresql-9.1.9/src/bin

= =C2=A0

total 44K

-rw-r--r-- 1 1107 1= 107=C2=A0 658 Apr=C2=A0 1=C2=A0 2013 Makefile

drwxrwxrwx 2 1107 1107 4.0K Apr=C2=A0 = 1=C2=A0 2013 pgevent

drwxrwxrwx 3 1107 1= 107 4.0K Aug 18=C2=A0 2013 initdb

drwxrwxrwx 3 1107 1107 4.0K Aug 18=C2=A0 2013 pg_c= tl

drwxrwxrwx 3 1107 1107 4.0K Aug 18=C2=A0 2= 013 pg_dump

drwxrwxrwx 3 1107 1107 4.0K Aug 18=C2=A0 2013 psql

drwxrwxrwx 3 1107 1107 4.0K Au= g 18=C2=A0 2013 scripts

drwxrwxrwx 3 1107 1= 107 4.0K Aug 18=C2=A0 2013 pg_controldata

= drwxrwxrwx 3 1107 1107 4.0K Aug 18=C2=A0 2= 013 pg_config

drwxrwxrwx 3 1107 1= 107 4.0K Aug 18=C2=A0 2013 pg_resetxlog

drwxrwxrwx 3 1107 1107 4.0K Aug 18=C2=A0 201= 3 pg_basebackup

=C2=A0

=C2=A0

=C2=A0

=C2=A0

How can then do a p= g_restore to prevent errors above?

=C2=A0

=C2=A0

Kind regards,

Khangelani

=C2=A0

=C2=A0

=C2=A0

=C2=A0

=C2=A0

=C2=A0

=C2=A0

=C2=A0

=C2=A0

=C2=A0

=C2=A0

=C2=A0

=C2=A0


CONFIDENTIALITY NOTICE
The contents of and attachments to this e-mail are intended for the addre=
ssee only, and may contain the confidential
information of Argility (Proprietary) Limited and/or its subsidiaries. An=
y review, use or dissemination thereof by anyone
other than the intended addressee is prohibited.If you are not the intend=
ed addressee please notify the writer immediately
and destroy the e-mail. Argility (Proprietary) Limited and its subsidiari=
es distance themselves from and accept no liability
for unauthorised use of their e-mail facilities or e-mails sent other tha=
n strictly for business purposes.
=0D
--047d7ba96d941af77a04ffcb4aeb--