Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZjA5c-0007Zk-8q for pgsql-admin@arkaria.postgresql.org; Mon, 05 Oct 2015 18:02:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZjA5b-00075H-Iy for pgsql-admin@arkaria.postgresql.org; Mon, 05 Oct 2015 18:02:19 +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 1ZjA3w-0004th-VN for pgsql-admin@postgresql.org; Mon, 05 Oct 2015 18:00:37 +0000 Received: from smtp2.cvent.com ([192.190.92.246]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZjA3p-0005qx-7n for pgsql-admin@postgresql.org; Mon, 05 Oct 2015 18:00:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cvent.com; i=@cvent.com; q=dns/txt; s=c1211; t=1444068029; x=1475604029; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=/B3pzWaB4TJCdmh7QIBtDQwi6kSxHcCgZC/cevjp7xk=; b=q3GLqrRViBgfmRWPniWiUARfgHrHrf+6vyVzXNz5V5cffZSGxNavcZgN 1Ai9VMGNExNJwrb2DVG4VFmyZ0EqqrxO4dAGwjwLcQlJ5tjZd2zOGe8zr JZhYZ4T+FXNrbvyHUz+Nh8O/YxXFmZJV4xe/TJFnrfiOv54qCWBI1lcez U=; X-IronPort-AV: E=Sophos;i="5.17,639,1437451200"; d="scan'208";a="7933616" 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//8cJgA== Date: Mon, 5 Oct 2015 18:00:27 +0000 Message-ID: References: <20151005172418.GA6784@momjian.us> In-Reply-To: <20151005172418.GA6784@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="us-ascii" Content-ID: <82265C1635997744BE53E78B72DA029D@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, 1:24 PM, "Bruce Momjian" wrote: >On Mon, Oct 5, 2015 at 05:05:46PM +0000, Guo, Yun wrote: >> -bash-4.1$ /usr/pgsql-9.3/bin/pg_ctl stop -D /data/pg.old >> waiting for server to shut down.... done >> server stopped >> -bash-4.1$ pg_upgrade -b /usr/pgsql-9.3/bin -B /usr/pgsql-9.4/bin -d >>/data/ >> pg.old -D /data/pg --check >> Performing Consistency Checks >> ----------------------------- >> Checking cluster versions ok >> SQL command failed >> 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=20=20=20=20 >> 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') )); >> ERROR: cache lookup failed for type 1670699 > >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; This turns out to be empty in all of the databases: postgres=3D# SELECT * FROM pg_type WHERE oid =3D 1670699; typname | typnamespace | typowner | typlen | typbyval | typtype | typcategory | typispreferred | typisdefined | typdelim | typrelid | typ elem | typarray | typinput | typoutput | typreceive | typsend | typmodin | typmodout | typanalyze | typalign | typstorage | typnotnull | t ypbasetype | typtypmod | typndims | typcollation | typdefaultbin | typdefault | typacl ---------+--------------+----------+--------+----------+---------+--------- ----+----------------+--------------+----------+----------+---- -----+----------+----------+-----------+------------+---------+----------+- ----------+------------+----------+------------+------------+-- -----------+-----------+----------+--------------+---------------+--------- ---+-------- (0 rows) > >This query doesn't even query pg_type, so it must be some internal use >of pg_type. > >The reason check doesn't show the failure is that only a non-check run >collects pg_class.oid values, but we never expect that to fail so we >don't test it in check mode. > >My guess is that something is messed up in your system catalogs. Can >you try running this query in each old database and see if it fails. If my old server system catalog is messed up is there way to repair it? > >--=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