Thread: ERROR: missing cache data for cache id 27
Hi! There was a discussion with this same subject last week that seemed to be caused by dump/restore with a wrong phpPgAdmin version. I'm seeing the same error message for a development database where I always use psql directly to make the maintenance and I had no dump/restore before it started happening. I'm using PostgreSQL 8.1.4 and psql 8.1.4 as well. ================================================================================ % LC_ALL= LANG= psql --version psql (PostgreSQL) 8.1.4 contains support for command-line editing ================================================================================ I created two plpgsql functions with the following signatures: ================================================================================ CREATE OR REPLACE FUNCTION neolab.f_v_resultados_situacao( p_amostra_id INTEGER, p_analise_id INTEGER, OUT o_situacao TEXT, OUT o_data_previsao DATE) AS $_$ (...) $_$ LANGUAGE plpgsql STABLE STRICT; CREATE OR REPLACE FUNCTION neolab.f_v_resultados_situacao( p_amostra_analise_id INTEGER, OUT o_situacao TEXT, OUT o_data_previsao DATE) AS $_$ (...) $_$ LANGUAGE plpgsql STABLE STRICT; ================================================================================ (The second overloads the first.) They were created but I couldn't update their code because of the missing cache data error. If I drop the function and recreate it, all goes well, but I can't "REPLACE" it. If I drop the first function, then I can REPLACE the second. If I don't, then I get the missing cache error for both. Is there some way to reset this cache so that I can investigate the cause of the problem or would I have to recreate the database (i.e. a dump + dropdb + createdb + restore)? TIA, -- Jorge Godoy <jgodoy@gmail.com>
Jorge Godoy <jgodoy@gmail.com> writes: > I'm using PostgreSQL 8.1.4 and psql 8.1.4 as well. This was fixed in 8.1.5 ... or at least the only known cause was fixed. 2006-10-06 14:23 tgl * src/: backend/utils/cache/catcache.c, backend/utils/cache/syscache.c, include/utils/catcache.h (REL8_1_STABLE), backend/utils/cache/catcache.c, backend/utils/cache/syscache.c, include/utils/catcache.h (REL8_0_STABLE), backend/utils/cache/catcache.c, backend/utils/cache/syscache.c, include/utils/catcache.h: Fix SysCacheGetAttr() to handle the case where the specified syscache has not been initialized yet. This can happen because there are code paths that call SysCacheGetAttr() on a tuple originally fetched from a different syscache (hopefully on the same catalog) than the one specified in the call. It doesn't seem useful or robust to try to prevent that from happening, so just improve the function to cope instead. Per bug#2678 from Jeff Trout. The specific example shown by Jeff is new in 8.1, but to be on the safe side I'm backpatching 8.0 as well. We could patch 7.x similarly but I think that's probably overkill, given the lack of evidence of old bugs of this ilk. regards, tom lane
Tom Lane <tgl@sss.pgh.pa.us> writes: > Jorge Godoy <jgodoy@gmail.com> writes: >> I'm using PostgreSQL 8.1.4 and psql 8.1.4 as well. > > This was fixed in 8.1.5 ... or at least the only known cause was fixed. Thanks! I'll bug OpenSuSE guys to release an 8.1.5 package ;-) -- Jorge Godoy <jgodoy@gmail.com>
On Sun, Feb 04, 2007 at 03:18:07PM -0200, Jorge Godoy wrote: > Tom Lane <tgl@sss.pgh.pa.us> writes: > > > Jorge Godoy <jgodoy@gmail.com> writes: > >> I'm using PostgreSQL 8.1.4 and psql 8.1.4 as well. > > > > This was fixed in 8.1.5 ... or at least the only known cause was > > fixed. > > Thanks! I'll bug OpenSuSE guys to release an 8.1.5 package ;-) 8.1.6 is the current one. Cheers, D -- David Fetter <david@fetter.org> http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote!
On Sun, Feb 04, 2007 at 23:43:48 -0800, David Fetter <david@fetter.org> wrote: > On Sun, Feb 04, 2007 at 03:18:07PM -0200, Jorge Godoy wrote: > > Tom Lane <tgl@sss.pgh.pa.us> writes: > > > > > Jorge Godoy <jgodoy@gmail.com> writes: > > >> I'm using PostgreSQL 8.1.4 and psql 8.1.4 as well. > > > > > > This was fixed in 8.1.5 ... or at least the only known cause was > > > fixed. > > > > Thanks! I'll bug OpenSuSE guys to release an 8.1.5 package ;-) > > 8.1.6 is the current one. That is so yesterday. You'll want to get 8.1.7 now.