Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VySfD-0005pM-MA for pgsql-general@arkaria.postgresql.org; Wed, 01 Jan 2014 20:45:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VySfD-0005gE-0o for pgsql-general@arkaria.postgresql.org; Wed, 01 Jan 2014 20:45:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VySfB-0005f9-Ix for pgsql-general@postgresql.org; Wed, 01 Jan 2014 20:45:13 +0000 Received: from zixgateway01.rowan.edu ([150.250.76.11]) by magus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VySf7-0005Ol-Qo for pgsql-general@postgresql.org; Wed, 01 Jan 2014 20:45:12 +0000 Received: from 127.0.0.1 (ZixVPM [127.0.0.1]) by Outbound.rowan.edu (Proprietary) with SMTP id B83722F51F7 for ; Wed, 1 Jan 2014 15:44:31 -0500 (EST) Received: from mx5.rowan.edu (mx5.rowan.edu [150.250.65.17]) by zixgateway01.rowan.edu (Proprietary) with ESMTP id 3C38F2F51DD for ; Wed, 1 Jan 2014 15:44:31 -0500 (EST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap8EAIt9xFKW+kAx/2dsb2JhbABOCr03gSx0giUBAQEEOlEBCBgeQiUBAQQTiAObcqN9hFMXjkFjhDYEiUOOVIpLh0mDSw X-IPAS-Result: Ap8EAIt9xFKW+kAx/2dsb2JhbABOCr03gSx0giUBAQEEOlEBCBgeQiUBAQQTiAObcqN9hFMXjkFjhDYEiUOOVIpLh0mDSw X-IronPort-AV: E=Sophos;i="4.95,586,1384318800"; d="scan'208";a="32875638" Received: from exchange2007-ca-1.rowan.edu (HELO ex2k7-ca-1.rowanads.rowan.edu) ([150.250.64.49]) by mx2-outbound.rowan.edu with ESMTP; 01 Jan 2014 15:45:06 -0500 Received: from EX2K7-MB-10.rowanads.rowan.edu ([150.250.64.34]) by ex2k7-ca-1.rowanads.rowan.edu ([fe80::81d0:18b3:b6b7:2ff5%15]) with mapi; Wed, 1 Jan 2014 15:44:16 -0500 From: "Reiser, John J." To: "pgsql-general@postgresql.org" Date: Wed, 1 Jan 2014 15:45:04 -0500 Subject: Re: duplicate OID issue when using pg_upgrade to move from 8.4 to 9.2 Thread-Topic: [GENERAL] duplicate OID issue when using pg_upgrade to move from 8.4 to 9.2 Thread-Index: Ac8HMjzfEfFZ6OHMQveDi5Q5Lis6zQ== Message-ID: In-Reply-To: <32098.1388608632@sss.pgh.pa.us> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.2.3.120616 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-VPM-MSG-ID: 3b8bccaf-2f35-4787-a397-04cc5c40eab9 X-VPM-HOST: zixgateway01.rowan.edu X-VPM-ENC-REGIME: Plaintext X-VPM-CERT-FLAG: 0 X-VPM-IS-HYBRID: 0 X-Pg-Spam-Score: -0.0 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org On 1/1/14, 3:37 PM, "Tom Lane" wrote: >"Reiser, John J." writes: >> On 1/1/14, 12:38 PM, "Tom Lane" wrote: >>> What this smells like is a bug in the pg_dump --binary_upgrade logic >>>that >>> tries to preserve type OIDs from the old installation to the new one. >>> Is there a preceding CREATE TYPE command for st_envelope in the dump >>> script? Look for calls to binary_upgrade.set_next_pg_type_oid() and >>> binary_upgrade.set_next_array_pg_type_oid() in the dump script --- are >>> there conflicting entries? Also, exactly what is type 1407909 in the >>> old installation (try "select * from pg_type where oid =3D 1407909")? > >> Once I got 8.4 back up, I searched for that OID in pg_type. select * >>from >> pg_type where oid =3D 1407909; returns 0 rows. > >Hm, which database(s) did you check in? It certainly appears from the >dump text you quote that type "spheroid" has OID 1407909 in at least one >database. > >> I did find this, searching through pg_upgrade_restore.log. There are 8 >> instances of the following text in the file: > >If I'm reading you right, then these must be instances of the same type >with the same OID declared in different databases. Could you look through >the dump for \connect commands to verify that? > >> SELECT binary_upgrade.set_next_pg_type_oid('1407909'::pg_catalog.oid); >> occurs 22 times on lines (1150, 1176, 44192, 44218, 64149, 64175, 71815, >> 71841, 79844, 79870, 88982, 89008, 97153, 97179, 106523, 106549, 289254, >> 289280, 297653, 297679, 310824, 310850) and all the close pairs are 26 >> lines apart, like the excerpt copied above. > >Could you look at the text surrounding these places to determine which >types this OID is being selected for? Each of these calls should be just >preceding a CREATE TYPE command (with maybe a set_next_array_pg_type_oid >call between) that is supposed to use the specified OID for its type. >Also identify which databases the commands are being issued in, by looking >back for the most recent \connect command. > >Also, is there any CREATE TYPE for st_envelope preceding the failing >CREATE FUNCTION command (in the same database)? > > regards, tom lane Tom,=20 Thanks for the info. After searching the output for the connection string, I found that it's failing on a database that can be archived. I think I'll get what I need from the database, drop it, then perform the upgrade. Thank you again for all of your help. It's greatly appreciated! John --=20 Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general