agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Adrian Klaver <adrian.klaver@aklaver.com>
To: Stuart <sfbarbee@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: ERROR: cache lookup failed for type
Date: Mon, 17 Aug 2015 07:11:27 -0700
Message-ID: <55D1EB8F.3050204@aklaver.com> (raw)
In-Reply-To: <55D16735.80304@gmail.com>
References: <55D131B0.6010500@gmail.com>
<15241.1439781395@sss.pgh.pa.us>
<55D15A62.70406@gmail.com>
<55D15E47.9020007@aklaver.com>
<55D16735.80304@gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>
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
view thread (9+ messages) latest in thread
Message-ID: <55D1EB8F.3050204@aklaver.com>
Permalink: ../55D1EB8F.3050204@aklaver.com/
Also on: postgresql.org/message-id/55D1EB8F.3050204@aklaver.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: adrian.klaver@aklaver.com, sfbarbee@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: ERROR: cache lookup failed for type
In-Reply-To: <55D1EB8F.3050204@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox