Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VyP30-0006M7-Td for pgsql-general@arkaria.postgresql.org; Wed, 01 Jan 2014 16:53:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VyP30-0005p4-CH for pgsql-general@arkaria.postgresql.org; Wed, 01 Jan 2014 16:53:34 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VyP2y-0005ov-Sh for pgsql-general@postgresql.org; Wed, 01 Jan 2014 16:53:33 +0000 Received: from zixgateway01.rowan.edu ([150.250.76.11]) by makus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VyP2q-000186-R7 for pgsql-general@postgresql.org; Wed, 01 Jan 2014 16:53:31 +0000 Received: from 127.0.0.1 (ZixVPM [127.0.0.1]) by Outbound.rowan.edu (Proprietary) with SMTP id EBAB92F51FA for ; Wed, 1 Jan 2014 11:52:44 -0500 (EST) Received: from mx5.rowan.edu (mx5.rowan.edu [150.250.65.17]) by zixgateway01.rowan.edu (Proprietary) with ESMTP id 6A52D2F51F9 for ; Wed, 1 Jan 2014 11:52:44 -0500 (EST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsEGAJ1HxFKW+kAx/2dsb2JhbABVA4JHfE+wSYhagSt0giyBBwQBaRcmAQSIFgmbT6QRhFMXBI4uWyiEJQSJQ45UgTCJG4IShTeDSw X-IPAS-Result: AsEGAJ1HxFKW+kAx/2dsb2JhbABVA4JHfE+wSYhagSt0giyBBwQBaRcmAQSIFgmbT6QRhFMXBI4uWyiEJQSJQ45UgTCJG4IShTeDSw X-IronPort-AV: E=Sophos;i="4.95,586,1384318800"; d="scan'208,217";a="32874483" 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 11:53:19 -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 11:52:30 -0500 From: "Reiser, John J." To: "pgsql-general@postgresql.org" Date: Wed, 1 Jan 2014 11:53:16 -0500 Subject: duplicate OID issue when using pg_upgrade to move from 8.4 to 9.2 Thread-Topic: duplicate OID issue when using pg_upgrade to move from 8.4 to 9.2 Thread-Index: Ac8HEdu7U2GW1jQdTDerfwFNp6UCdA== Message-ID: 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: multipart/alternative; boundary="_000_CEE9B22C1D257reiserrowanedu_" MIME-Version: 1.0 X-VPM-MSG-ID: fdba26d1-f920-4e6d-9fad-b84fca4d018f 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: 1.9 (+) 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 --_000_CEE9B22C1D257reiserrowanedu_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, I'm working on an upgrade to our database cluster, attempting to move from = 8.4 to 9.2. I'm encountering the following error when I attempt the upgrade= (in pg_upgrade_restore.log): CREATE FUNCTION "st_envelope_in"(cstring) RETURNS st_envelope LANGUAGE "c" IMMUTABLE STRICT AS 'st_geometry', 'ST_ENVELOPE_In'; psql:pg_upgrade_dump_db.sql:371910: ERROR: duplicate key value violates un= ique constraint "pg_type_oid_index" DETAIL: Key (oid)=3D(1407909) already exists. I'm running this on CentOS 6; both 8.4 and 9.2 are installed from the Yum r= epository. PostgreSQL is primarily used for GIS data and has ESRI st_geomet= ry and PostGIS installed in several of the databases. (ESRI's support is on= ly up to 9.2, which is why I'm not attempting a move to 9.3.) The interesti= ng thing with this error is that when I wipe out the 9.2 data directory, re= -initdb, and run the upgrade again, I now get a different error: CREATE TABLESPACE "sde1" OWNER "sde" LOCATION '/disk2/pgsql/data/sde'; psql:pg_upgrade_dump_globals.sql:294: ERROR: directory "/disk2/pgsql/data/= sde/PG_9.2_201204301" already in use as a tablespace (I have several of our ESRI SDE databases in their own tablespace.) Before starting this process, I made a complete file-based backup of the 8.= 4 data directory. When I restore the backup to /var/lib/pgsql and run pg_up= grade again, I receive the first error again, with the same exact OID value= . I will admit I don't know much about Postgres internals and I'm not sure = how to proceed with this duplicate OID issue. I'm going to try running pg_upgrade with the link option now, but I don't k= now if that will help. Any assistance provided would be greatly appreciated. Thanks, John John Reiser Geospatial Research Lab Rowan University 201 Mullica Hill Road Glassboro, NJ 08028 phone: 856-256-4817 cell: 856-347-0047 twitter: @rowangeolab --_000_CEE9B22C1D257reiserrowanedu_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hello,

I'm working on an upgrade to our database clu= ster, attempting to move from 8.4 to 9.2. I'm encountering the following er= ror when I attempt the upgrade (in pg_upgrade_restore.log):

CREATE FUNCTION "st_envelope_in"(cstring) RETURNS st_envelope
    LANGUAGE "c" IMMUTABLE STR= ICT
    AS 'st_geometry',= 'ST_ENVELOPE_In';
psql:pg_upgrade_= dump_db.sql:371910: ERROR:  duplicate key value violates unique constr= aint "pg_type_oid_index"
DETAIL: &n= bsp;Key (oid)=3D(1407909) already exists.

I'm running this on CentOS = 6; both 8.4 and 9.2 are installed from the Yum repository. PostgreSQL is pr= imarily used for GIS data and has ESRI st_geometry and PostGIS installed in= several of the databases. (ESRI's support is only up to 9.2, which is why = I'm not attempting a move to 9.3.) The interesting thing with this error is= that when I wipe out the 9.2 data directory, re-initdb, and run the upgrad= e again, I now get a different error:

CREATE TABLESPACE "sde1" OWNER "sde" LOCATION '/disk2/pgsql/data/s= de';
psql:pg_upgrade_dump_globals.= sql:294: ERROR:  directory "/disk2/pgsql/data/sde/PG_9.2_201204301" al= ready in use as a tablespace

(I have several of our ESRI SDE databases in their own tablespace= .)

Before starting this process, I made a complete= file-based backup of the 8.4 data directory. When I restore the backup to = /var/lib/pgsql and run pg_upgrade again, I receive the first error again, w= ith the same exact OID value. I will admit I don't know much about Postgres= internals and I'm not sure how to proceed with this duplicate OID issue.&n= bsp;

I'm going to try running pg_upgrade with the = link option now, but I don't know if that will help.

Any assistance provided would be greatly appreciated. 
Thanks,
John

<= p class=3D"MsoNormal" style=3D"margin: 0in 0in 0.0001pt; font-size: 11pt;">= John Reiser

= Geospatial Researc= h Lab

Rowan University=

201 Mullica Hill Road

= Glassboro, NJ 08028

phone: 856-256-4817

cell: 856-347-0047

twitter: @rowangeola= b

--_000_CEE9B22C1D257reiserrowanedu_--