Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XEH9r-0007qR-E9 for pgsql-admin@arkaria.postgresql.org; Mon, 04 Aug 2014 12:14:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XEH9o-0000YG-Ex for pgsql-admin@arkaria.postgresql.org; Mon, 04 Aug 2014 12:14:28 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XEH9m-0000Xt-QY for pgsql-admin@postgresql.org; Mon, 04 Aug 2014 12:14:27 +0000 Received: from eu1sys200aog116.obsmtp.com ([207.126.144.141]) by makus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XEH9g-0007ap-Eg for pgsql-admin@postgresql.org; Mon, 04 Aug 2014 12:14:22 +0000 Received: from mail-pd0-f182.google.com ([209.85.192.182]) (using TLSv1) by eu1sys200aob116.postini.com ([207.126.147.11]) with SMTP ID DSNKU995GekDyGhd1PzTKo/RjwSkjjNxqLuJ@postini.com; Mon, 04 Aug 2014 12:14:20 UTC Received: by mail-pd0-f182.google.com with SMTP id fp1so9498519pdb.41 for ; Mon, 04 Aug 2014 05:14:16 -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:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:content-type; bh=PaTxtRzWvuFcdy3NHlxyI4Wmb+Ule1kJveds+yJ+sls=; b=gvlfFhBnbb6dSt8Cw8ak4xSNAktgOv3w0rKUyB3RHiZG8u5U3393QRGuH60cZxStpJ 5HYoR2s8lBbeL8C6LECrKMDhw2E4rGnp0m/vgrgLzYuWeZ4N5LrByUKVAPdFo04Vj5Le 19tHKNvQNzpqOwKaYT4uH4yBi2KLsLOBu6700XNga6HOYcl3GyPKrt1S5t4NLDS0DyAt nehfLqeBekKrEtKFjGBBR5Tr4lVPqH9Hixo33WqFiLCMMBbFCRXW8YkHGVPMr4fR+MHP 2CVaWzynv7X2yo9XO7pDDQ510/AjWJwYliElaA+t5aO1jgBE02aayLPKrvu4c/Os/1nX sLBg== X-Gm-Message-State: ALoCoQmz/e4CnGQ4JQKhjjc0ZzvNL74ACTW/3YXpfhMAEcxnR441Th5VYarZ0U6XPQlnWPvDKe/f4k1GLML7SHlodr0HN67SsJrKN6o3hZu9X6etnKUjHpwAmOcx7n9jUTnK0vZ9Zzj12kfwQ2yZIWE9izML48bzcA== X-Received: by 10.67.23.165 with SMTP id ib5mr23341860pad.60.1407154456739; Mon, 04 Aug 2014 05:14:16 -0700 (PDT) X-Received: by 10.67.23.165 with SMTP id ib5mr23341830pad.60.1407154456456; Mon, 04 Aug 2014 05:14:16 -0700 (PDT) From: Khangelani Gama References: bf801eb082936b7671c4f7dfb26beec3@mail.gmail.com In-Reply-To: bf801eb082936b7671c4f7dfb26beec3@mail.gmail.com MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac+vz11LwJVP4ePUQzirNJuayY1JmQADhLeQ Date: Mon, 4 Aug 2014 14:14:14 +0200 Message-ID: <8e62fc3c2be3628fefbc9395c895f52b@mail.gmail.com> Subject: Re: upgrading postgres 7.3.4 to 9.1.9 To: pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary=001a11343ec08584d104ffccad2b 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 --001a11343ec08584d104ffccad2b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable P.S plperl.control file is in =3D>/home/ellerines/pgsql9_upgrade/postgresql-9.1.9/src/pl/plperl =3D> l -ltrh total 364K -rw-r--r-- 1 1107 1107 4.8K Apr 1 2013 Util.xs -rw-r--r-- 1 1107 1107 2.2K Apr 1 2013 text2macro.pl -rw-r--r-- 1 1107 1107 3.5K Apr 1 2013 SPI.xs -rw-r--r-- 1 1107 1107 462 Apr 1 2013 README -rw-r--r-- 1 1107 1107 171K Apr 1 2013 ppport.h -rw-r--r-- 1 1107 1107 376 Apr 1 2013 plperlu--unpackaged--1.0.sql -rw-r--r-- 1 1107 1107 367 Apr 1 2013 plperl--unpackaged--1.0.sql -rw-r--r-- 1 1107 1107 187 Apr 1 2013 plperlu.control -rw-r--r-- 1 1107 1107 337 Apr 1 2013 plperlu--1.0.sql -rw-r--r-- 1 1107 1107 2.0K Apr 1 2013 plperl_opmask.pl -rw-r--r-- 1 1107 1107 2.9K Apr 1 2013 plperl_helpers.h -rw-r--r-- 1 1107 1107 2.7K Apr 1 2013 plperl.h -rw-r--r-- 1 1107 1107 176 Apr 1 2013 plperl.control -rw-r--r-- 1 1107 1107 100K Apr 1 2013 plperl.c -rw-r--r-- 1 1107 1107 323 Apr 1 2013 plperl--1.0.sql -rw-r--r-- 1 1107 1107 922 Apr 1 2013 plc_trusted.pl -rw-r--r-- 1 1107 1107 1.9K Apr 1 2013 plc_perlboot.pl -rw-r--r-- 1 1107 1107 253 Apr 1 2013 nls.mk -rw-r--r-- 1 1107 1107 3.8K Apr 1 2013 GNUmakefile drwxrwxrwx 2 1107 1107 4.0K Apr 1 2013 sql drwxrwxrwx 2 1107 1107 4.0K Apr 1 2013 po drwxrwxrwx 2 1107 1107 4.0K Apr 1 2013 expected *From:* Khangelani Gama [mailto:kgama@argility.com] *Sent:* 04 August 2014 12:35 PM *To:* 'pgsql-admin@postgresql.org' *Subject:* upgrading postgres 7.3.4 to 9.1.9 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 --001a11343ec08584d104ffccad2b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

P.S

=C2=A0=

=C2=A0

plperl.control file is in

=C2=A0

=C2=A0

=3D>/home/ellerines= /pgsql9_upgrade/postgresql-9.1.9/src/pl/plperl

=3D> l -ltrh

total 364K

-rw-r--r-- 1 1107 1107= 4.8K Apr=C2=A0 1=C2=A0 2013 Util.xs

-rw-r--r-- 1 1107 1107 2.2K Apr=C2=A0 1=C2=A0 2013= text2macro.pl

-rw-r--r-- 1 1107 1107= 3.5K Apr=C2=A0 1=C2=A0 2013 SPI.xs

-rw-r--r-- 1 1107 1107=C2=A0 462 Apr=C2=A0 1=C2=A0 = 2013 README

-rw-r--r-- 1 1107 1107 171K Apr=C2=A0 1=C2=A0= 2013 ppport.h

-rw-r--r-- 1 1107 1107=C2=A0 376 Apr=C2=A0 1=C2=A0 2013 plperlu--unpacka= ged--1.0.sql

-rw-r--r-- 1 1107 1107=C2=A0 367 Apr=C2=A0 1= =C2=A0 2013 plperl--unpackaged--1.0.sql

-rw-r--r-- 1 1107 1107=C2=A0 187 Apr=C2=A0 1=C2= =A0 2013 plperlu.control

-rw-r--r-- 1 1107 1107= =C2=A0 337 Apr=C2=A0 1=C2=A0 2013 plperlu--1.0.sql

-rw-r--r-- 1 1107 1107 2.0K Apr=C2= =A0 1=C2=A0 2013 plperl_opmask.pl

-rw-r--r-- 1 1107 1107= 2.9K Apr=C2=A0 1=C2=A0 2013 plperl_helpers.h

-rw-r--r-- 1 1107 1107 2.7K Apr=C2=A0 1= =C2=A0 2013 plperl.h

-rw-r--r-- 1 1107 1107= =C2=A0 176 Apr=C2=A0 1=C2=A0 2013 plperl.control

-rw-r--r-- 1 1107 1107 100K Apr=C2=A0 = 1=C2=A0 2013 plperl.c

-rw-r--r-- 1 1107 1107= =C2=A0 323 Apr=C2=A0 1=C2=A0 2013 plperl--1.0.sql

-rw-r--r-- 1 1107 1107=C2=A0 922 Apr= =C2=A0 1=C2=A0 2013 plc_trusted.pl

-rw-r--r-- 1 1107 1107= 1.9K Apr=C2=A0 1=C2=A0 2013 plc_perlboo= t.pl

-rw= -r--r-- 1 1107 1107=C2=A0 253 Apr=C2=A0 1=C2=A0 2013 nls.mk

-rw-r--r-- 1 1107 1107= 3.8K Apr=C2=A0 1=C2=A0 2013 GNUmakefile

<= span style=3D"color:#1f497d">drwxrwxrwx 2 1107 1107 4.0K Apr=C2=A0 1=C2=A0 = 2013 sql

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

drw= xrwxrwx 2 1107 1107 4.0K Apr=C2=A0 1=C2=A0 2013 expected

=C2=A0

=C2=A0

=C2=A0

=C2=A0

From: Khangelani Gama [mailto:kgama@argility.com]
Sent: 04 August 2014 12:35 PM
To: 'pgsql-admin@postgresql.org'
Subjec= t: upgrading postgres 7.3.4 to 9.1.9

=C2=A0

Hi=

=C2=A0

Please help me he= re, 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 runni= ng on it but this one instance 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

=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
--001a11343ec08584d104ffccad2b--