Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZRL8q-0003KN-II for pgsql-sql@arkaria.postgresql.org; Mon, 17 Aug 2015 14:12:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZRL8p-0005vv-JZ for pgsql-sql@arkaria.postgresql.org; Mon, 17 Aug 2015 14:11:59 +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 1ZRL8m-0005uR-HA for pgsql-sql@postgresql.org; Mon, 17 Aug 2015 14:11:56 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZRL8j-0006N9-OP for pgsql-sql@postgresql.org; Mon, 17 Aug 2015 14:11:55 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 636B42140F for ; Mon, 17 Aug 2015 10:11:52 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Mon, 17 Aug 2015 10:11:52 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=hKPxoxdHA9qvEsR/HaVJya1ii+s=; b=NryyO6 d0Jshngeo3nwynXY1CEnCAO4YeRbperW9gbMyaOoajWk4l6BboY/gGby+Qvms2IJ sjvTND8TwEF6FuckjlGN21Bzjs8D0nscPGmmBYsOngf1eqrxior7IMlDu8GcEo95 8E845T09Q4sORdLaUDkKO6FIysFDXKjKIRvzo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=hKPxoxdHA9qvEsR /HaVJya1ii+s=; b=slME+zh9N4N1cYZOYKNN2hPG3qj7VBpvuQJA01x6il+vBSg RzHAAgoOqcnfsiXGFhOeB4dszZNy56Vmip/Bz71lUaixAfjFi8P7AWKOFa5Am9B2 FnGTDFcagwec8rhYivHSGPlGmD1erv6HdLIsAp/REm4+YX49DNV47V4wjIUk= X-Sasl-enc: tKyoxGU5dCRlLcw1A0YmfvGP5QIRLQSPjC/uvVZ97Nsh 1439820712 Received: from [192.168.1.3] (174-21-248-106.tukw.qwest.net [174.21.248.106]) by mail.messagingengine.com (Postfix) with ESMTPA id BA3DC680126; Mon, 17 Aug 2015 10:11:51 -0400 (EDT) Subject: Re: ERROR: cache lookup failed for type To: Stuart , Tom Lane References: <55D131B0.6010500@gmail.com> <15241.1439781395@sss.pgh.pa.us> <55D15A62.70406@gmail.com> <55D15E47.9020007@aklaver.com> <55D16735.80304@gmail.com> Cc: "pgsql-sql@postgresql.org" From: Adrian Klaver Message-ID: <55D1EB8F.3050204@aklaver.com> Date: Mon, 17 Aug 2015 07:11:27 -0700 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55D16735.80304@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org On 08/16/2015 09:46 PM, Stuart wrote: > On 08/17/2015 08:08 AM, Adrian Klaver wrote: >> So this is what you did when you started with the Alpha 1 database, >> correct? >> >> When you went to Alpha 2 you just installed the new program over the >> existing Alpha 1, but left the data directory as is and then ran into >> the error, correct? >> >> You then did a dump of the Alpha 1 or other(?) existing database and >> then a restore into the Alpha 2(the reload above) at which point the >> error went away, correct? > > Adrian, that is correct. More precisely, the steps taken were the > following which I now see where I may have potentially introduced the error: > > upgrade from prostgres 9.4.4 to 9.5alpha1 > > pg_dumpall > file.sql > pg_ctl stop > upgrade postgres 9.5alpha1 > rm -r /pgdir/* > initdb -D /pgdir/ > pg_ctl start -D /pgdir/ > psql template1 -f file.sql > > > upgrade from postgres 9.5alpha1 to 9.5alpha2 > > upgrade postgres 9.5alpha1 > pg_ctl stop > pg_ctl start -D /pgdir/ > > > Now I see that not stopping the database prior to the upgrade may have > introduced the problem eventhough I don't understand the internals. I > did do another pg_ctl stop/start after upgrade just to see if that would > fix but it didn't. Yeah, I would say all bets are off when overwriting a running database. How are you doing the upgrade, from a package or source? I now the .deb packages allow for running multiple versions concurrently and I believe that yum can work that way also. If building from source you can do something like --prefix=/usr/local/pgsql94 in configure to separate versions. Then you just have to change the port in postgresql.conf to have multiple versions on a machine. Somewhat less dangerous then deleting $DATA. > > I just did the following steps, and now no error: > > pg_dumpall > file.sql > pg_ctl stop > rm -r /pgdir/* > initdb -D /pgdir/ > pg_ctl start -D /pgdir/ > psql template1 -f file.sql > > logged into db and recreated the function > > psql db > create function ds_stats... > > > > > Thanks, > > Stuart > > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql