Re: ERROR: cache lookup failed for type - Mailing list pgsql-sql
From | Stuart |
---|---|
Subject | Re: ERROR: cache lookup failed for type |
Date | |
Msg-id | CALmuyMp=_tSKhDwrFScvCmn1Xd+=ze27YwdPFT7TR4OjbSQteA@mail.gmail.com Whole thread Raw |
In response to | Re: ERROR: cache lookup failed for type (Adrian Klaver <adrian.klaver@aklaver.com>) |
List | pgsql-sql |
<p dir="ltr">Adrian, <p dir="ltr">Doing upgrade from source. <p dir="ltr">Thanks, <p dir="ltr">Stuart<div class="gmail_quote">OnAug 17, 2015 6:11 PM, "Adrian Klaver" <<a href="mailto:adrian.klaver@aklaver.com">adrian.klaver@aklaver.com</a>>wrote:<br type="attribution" /><blockquote class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 08/16/2015 09:46 PM, Stuart wrote:<br/><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On 08/17/201508:08 AM, Adrian Klaver wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #cccsolid;padding-left:1ex"> So this is what you did when you started with the Alpha 1 database,<br /> correct?<br /><br/> When you went to Alpha 2 you just installed the new program over the<br /> existing Alpha 1, but left the data directoryas is and then ran into<br /> the error, correct?<br /><br /> You then did a dump of the Alpha 1 or other(?) existingdatabase and<br /> then a restore into the Alpha 2(the reload above) at which point the<br /> error went away, correct?<br/></blockquote><br /> Adrian, that is correct. More precisely, the steps taken were the<br /> following whichI now see where I may have potentially introduced the error:<br /><br /> upgrade from prostgres 9.4.4 to 9.5alpha1<br/><br /> pg_dumpall > file.sql<br /> pg_ctl stop<br /> upgrade postgres 9.5alpha1<br /> rm -r /pgdir/*<br/> initdb -D /pgdir/<br /> pg_ctl start -D /pgdir/<br /> psql template1 -f file.sql<br /><br /><br /> upgradefrom postgres 9.5alpha1 to 9.5alpha2<br /><br /> upgrade postgres 9.5alpha1<br /> pg_ctl stop<br /> pg_ctl start -D/pgdir/<br /><br /><br /> Now I see that not stopping the database prior to the upgrade may have<br /> introduced the problemeventhough I don't understand the internals. I<br /> did do another pg_ctl stop/start after upgrade just to see ifthat would<br /> fix but it didn't.<br /></blockquote><br /> Yeah, I would say all bets are off when overwriting a runningdatabase.<br /><br /> How are you doing the upgrade, from a package or source?<br /><br /> I now the .deb packagesallow for running multiple versions concurrently and I believe that yum can work that way also. If building fromsource you can do something like --prefix=/usr/local/pgsql94 in configure to separate versions. Then you just have tochange the port in postgresql.conf to have multiple versions on a machine. Somewhat less dangerous then deleting $DATA.<br/><br /><br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br/> I just did the following steps, and now no error:<br /><br /> pg_dumpall > file.sql<br />pg_ctl stop<br /> rm -r /pgdir/*<br /> initdb -D /pgdir/<br /> pg_ctl start -D /pgdir/<br /> psql template1 -f file.sql<br/><br /> logged into db and recreated the function<br /><br /> psql db<br /> create function ds_stats...<br /><br/><br /><br /><br /> Thanks,<br /><br /> Stuart<br /><br /><br /></blockquote><br /><br /> -- <br /> Adrian Klaver<br/><a href="mailto:adrian.klaver@aklaver.com" target="_blank">adrian.klaver@aklaver.com</a><br /></blockquote></div>