Thread: ERROR: cache lookup for proc 43030134 failed

ERROR: cache lookup for proc 43030134 failed

From
Kovacs Zoltan
Date:
Starting pg_dump, this error occured (there is no output dump,
unfortunately). Getting closer, I got this:

tir=# SELECT pg_get_viewdef(c.relname) AS definition FROM pg_class c
offset 441 limit 1;
ERROR:  cache lookup for proc 4303134 failed
tir=# SELECT c.relname AS definition FROM pg_class c offset 441 limit 1;definition
------------sooe
(1 row)

tir=# SELECT pg_get_viewdef('sooe');pg_get_viewdef
----------------Not a view
(1 row)

Yesterday I created some triggers and functions. I got this since that
time. The thing here seems to be a strange internal error, is it? Sorry if
this problem is an already reported one.

TIA, Zoltan
                        Kov\'acs, Zolt\'an                        kovacsz@pc10.radnoti-szeged.sulinet.hu
       http://www.math.u-szeged.hu/~kovzol                        ftp://pc10.radnoti-szeged.sulinet.hu/home/kovacsz
 



Re: ERROR: cache lookup for proc 43030134 failed

From
Tom Lane
Date:
Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu> writes:
> Starting pg_dump, this error occured (there is no output dump,
> unfortunately). Getting closer, I got this:

> tir=# SELECT pg_get_viewdef(c.relname) AS definition FROM pg_class c
> offset 441 limit 1;
> ERROR:  cache lookup for proc 4303134 failed

I think you've got a view or rule that refers to a function you dropped.
        regards, tom lane


Re: ERROR: cache lookup for proc 43030134 failed

From
Kovacs Zoltan
Date:
On Thu, 31 May 2001, Tom Lane wrote:

> Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu> writes:
> > Starting pg_dump, this error occured (there is no output dump,
> > unfortunately). Getting closer, I got this:
> 
> > tir=# SELECT pg_get_viewdef(c.relname) AS definition FROM pg_class c
> > offset 441 limit 1;
> > ERROR:  cache lookup for proc 4303134 failed
> 
> I think you've got a view or rule that refers to a function you dropped.

How can I find out that which view or rule is referring?

TIA, Zoltan



Re: ERROR: cache lookup for proc 43030134 failed

From
Kovacs Zoltan
Date:
On Thu, 31 May 2001, Tom Lane wrote:

> Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu> writes:
> > Starting pg_dump, this error occured (there is no output dump,
> > unfortunately). Getting closer, I got this:
> 
> > tir=# SELECT pg_get_viewdef(c.relname) AS definition FROM pg_class c
> > offset 441 limit 1;
> > ERROR:  cache lookup for proc 4303134 failed
> 
> I think you've got a view or rule that refers to a function you dropped.

It seems that there is a problem with the views. The SELECT you can see
above is a part of the definition of pg_views. But consider this:

tir=# SELECT c.relname AS viewname, pg_get_userbyid(c.relowner) AS
viewowner, pg_get_viewdef(c.relname) AS definition FROM pg_class c WHERE
(c.relkind = 'v'::"char") limit 21 offset 1;
ERROR:  cache lookup for proc 4303134 failed

It means that the 21st line of the result is problematic, because writing
20 instead of 21 I got no problem. Consider this:

tir=# SELECT c.relname AS viewname, pg_get_userbyid(c.relowner) AS
viewowner FROM pg_class c WHERE (c.relkind = 'v'::"char") offset 21 limit
1; viewname   | viewowner
-------------+-----------felhasznalo | postgres
(1 row)

This is the problematic view. I selected only its name, not the
definition. But selecting this:

tir=# SELECT c.relname AS viewname, pg_get_userbyid(c.relowner) AS
viewowner, pg_get_viewdef(c.relname) AS definition FROM pg_class c WHERE
(c.relkind = 'v'::"char") and c.relname = 'felhasznalo'; viewname   | viewowner |      definition

-------------+-----------+------------------------------------------------------------------------------------------------------------------------------------felhasznalo
|postgres  | SELECT szemely.az, szemely.nev,
 
szemely.teljes_nev FROM szemely WHERE ((1 <= szemely.felhasznalo) AND
(szemely.felhasznalo <= 2));
(1 row)

I get no problem, it gives the definition. Why?

TIA, Zoltan



Re: ERROR: cache lookup for proc 43030134 failed

From
Tom Lane
Date:
Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu> writes:
> It means that the 21st line of the result is problematic, because writing
> 20 instead of 21 I got no problem.

I think not.  The current implementation of LIMIT fetches one more row
than is really needed, IIRC.
        regards, tom lane


Re: ERROR: cache lookup for proc 43030134 failed

From
Kovacs Zoltan
Date:
On Thu, 31 May 2001, Tom Lane wrote:

> Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu> writes:
> > It means that the 21st line of the result is problematic, because writing
> > 20 instead of 21 I got no problem.
> 
> I think not.  The current implementation of LIMIT fetches one more row
> than is really needed, IIRC.

Tom, the real problem is that I get _different_ output for 

tir=# SELECT c.relname AS viewname, pg_get_userbyid(c.relowner) AS
viewowner, pg_get_viewdef(c.relname) AS definition FROM pg_class c WHERE
(c.relkind = 'v'::"char") limit 21 offset 1;
ERROR:  cache lookup for proc 4303134 failed

and

tir=# SELECT c.relname AS viewname, pg_get_userbyid(c.relowner) AS
viewowner, pg_get_viewdef(c.relname) AS definition FROM pg_class c WHERE
(c.relkind = 'v'::"char") and c.relname = 'felhasznalo'; viewname   | viewowner |      definition

-------------+-----------+------------------------------------------------------------------------------------------------------------------------------------felhasznalo
|postgres  | SELECT szemely.az, szemely.nev,
 
szemely.teljes_nev FROM szemely WHERE ((1 <= szemely.felhasznalo) AND
(szemely.felhasznalo <= 2));
(1 row)

The second one also _should_ result an ERROR. (As you can see, this view
doesn't contain any function. I put an index on the table `szemely' but I
dropped it. There may be some relation between this error and the dropped
index...?)

In a consequence, I cannot pg_dump my database (which is under
production... :-( Please help! Unfortunately I cannot duplicate this
problem from scratch, but I may try to do it.

TIA, Zoltan



Re: ERROR: cache lookup for proc 43030134 failed

From
Tom Lane
Date:
Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu> writes:
>> I think not.  The current implementation of LIMIT fetches one more row
>> than is really needed, IIRC.

> Tom, the real problem is that I get _different_ output for 

The point is that the problem is probably in the 23rd row of pg_class,
not the 22nd.
        regards, tom lane


Re: ERROR: cache lookup for proc 43030134 failed

From
Kovacs Zoltan
Date:
> > Tom, the real problem is that I get _different_ output for 
> 
> The point is that the problem is probably in the 23rd row of pg_class,
> not the 22nd.

OK, I see! It works now... :-) Thank you, Tom.

Regards, Zoltan