Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZjAS5-0000P4-Bb for pgsql-admin@arkaria.postgresql.org; Mon, 05 Oct 2015 18:25:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZjAS4-0008L0-Tg for pgsql-admin@arkaria.postgresql.org; Mon, 05 Oct 2015 18:25:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZjAQQ-0005dz-RC for pgsql-admin@postgresql.org; Mon, 05 Oct 2015 18:23:50 +0000 Received: from smtp2.cvent.com ([192.190.92.246]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZjAQM-0007kK-3f for pgsql-admin@postgresql.org; Mon, 05 Oct 2015 18:23:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cvent.com; i=@cvent.com; q=dns/txt; s=c1211; t=1444069426; x=1475605426; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=9bKsBPESIukFwfzkDCb8MPYoBd8hLG+v+xbjDmDREAQ=; b=Ml1kusrlpPZV0jHHGWAOxZDGqnEps93FxnBeUUIDK3M8XBANsYEyv0/f dyprqG9/g/t7pShFH6m8uGk1HxZMHJ6CNVtAaOj/iz4c4e5wm5sevNsAx ikfB4X/op/s5vhKYgpFCUcHSR1ZDvyWPldUfDKdvbmzU8dWNaMLylcktF 0=; X-IronPort-AV: E=Sophos;i="5.17,639,1437451200"; d="scan'208";a="7934575" From: "Guo, Yun" To: Bruce Momjian CC: "pgsql-admin@postgresql.org" Subject: Re: pg_upgrade from 9.3 to 9.4 fails Thread-Topic: [ADMIN] pg_upgrade from 9.3 to 9.4 fails Thread-Index: AQHQ/4mcAUs7p8odSEODO5MGegI4x55dIRKAgABIPQD//8cJgIAAQ7QA//+9XICAAEZnAP//vwoA Date: Mon, 5 Oct 2015 18:23:43 +0000 Message-ID: References: <20151005172418.GA6784@momjian.us> <20151005180244.GB6784@momjian.us> <20151005181612.GC6784@momjian.us> In-Reply-To: <20151005181612.GC6784@momjian.us> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.5.3.150624 Content-Type: text/plain; charset="iso-8859-1" Content-ID: <73131DEC29EB52479FF829DC8F9C0B26@cvent.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Pg-Spam-Score: -2.0 (--) 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 On 10/5/15, 2:16 PM, "Bruce Momjian" wrote: >On Mon, Oct 5, 2015 at 06:04:13PM +0000, Guo, Yun wrote: >>=20 >>=20 >> On 10/5/15, 2:02 PM, "Bruce Momjian" wrote: >>=20 >> >On Mon, Oct 5, 2015 at 06:00:27PM +0000, Guo, Yun wrote: >> >> >Wow, that is weird. Can you run this query on the old cluster and >>show >> >> >us the output? >> >> > >> >> > SELECT * FROM pg_type WHERE oid =3D 1670699; >> >OK, try running the error query in all the databases then. >>=20 >> I tried it all databases. None of them has oid 1670699 in pg_type. > >Yes, I know that. I want you to run the query that generated the error >in each database and figure out which database has the problem, see >below. My guess is that database references a datatype that doesn't >exist anymore, for some reason. > >-------------------------------------------------------------------------- >- > >CREATE TEMPORARY TABLE info_rels (reloid) AS SELECT c.oid FROM >pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON c.relnamespace = =3D >n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid =3D i.indexrelid >WHERE >relkind IN ('r', 'm', 'i', 'S') AND i.indisvalid IS DISTINCT FROM false >AND > i.indisready IS DISTINCT FROM false AND ((n.nspname !~ '^pg_temp_' AND >n.nspname !~ '^pg_toast_temp_' AND n.nspname NOT IN ('pg_catalog', >'information_schema', 'binary_upgrade', 'pg_toast') AND c.oid >=3D 16384) >OR >(n.nspname =3D 'pg_catalog' AND relname IN ('pg_largeobject', >'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata', >'pg_largeobject_metadata_oid_index') )); Sorry I misunderstood you instruction. I tried this query in all databases and it executes without any error. I guess that=B9s the reason when I have the old server running the check could pass.=20 However, somehow when the old server is hut down it would fail. > >--=20 > Bruce Momjian http://momjian.us > EnterpriseDB http://enterprisedb.com > >+ As you are, so once was I. As I am, so you will be. + >+ Roman grave inscription + --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin