Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZjAKj-0008Qi-JV for pgsql-admin@arkaria.postgresql.org; Mon, 05 Oct 2015 18:17:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZjAKj-0001XU-5p for pgsql-admin@arkaria.postgresql.org; Mon, 05 Oct 2015 18:17:57 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZjAJ5-00086F-Uz for pgsql-admin@postgresql.org; Mon, 05 Oct 2015 18:16:16 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZjAJ3-0006EP-0A for pgsql-admin@postgresql.org; Mon, 05 Oct 2015 18:16:14 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1ZjAJ2-0005OY-1a; Mon, 05 Oct 2015 14:16:12 -0400 Date: Mon, 5 Oct 2015 14:16:12 -0400 From: Bruce Momjian To: "Guo, Yun" Cc: "pgsql-admin@postgresql.org" Subject: Re: pg_upgrade from 9.3 to 9.4 fails Message-ID: <20151005181612.GC6784@momjian.us> References: <20151005172418.GA6784@momjian.us> <20151005180244.GB6784@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) 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 Mon, Oct 5, 2015 at 06:04:13PM +0000, Guo, Yun wrote: > > > On 10/5/15, 2:02 PM, "Bruce Momjian" wrote: > > >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 = 1670699; > >OK, try running the error query in all the databases then. > > 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 = n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid = 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 >= 16384) OR (n.nspname = 'pg_catalog' AND relname IN ('pg_largeobject', 'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata', 'pg_largeobject_metadata_oid_index') )); -- 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 + -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin