pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedCache lookup error
4+ messages / 3 participants
[nested] [flat]
* Cache lookup error
@ 2002-05-24 20:01 Ramya Asokan <ramya.asokan@wdc.greenpeace.org>
0 siblings, 0 replies; 4+ messages in thread
From: Ramya Asokan @ 2002-05-24 20:01 UTC (permalink / raw)
To: pgsql-admin; pgadmin-support@postgresql.org
Hi,
I created a function and a trigger - I then dropped them and created
the same function and trigger with a different name, but i keep getting
the error : cache lookup failed. I don't know what this means, and would
be very grateful if you can help me out.
Thanks,
Ramya
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Cache lookup error
@ 2002-05-24 21:27 Dave Page <dpage@vale-housing.co.uk>
0 siblings, 1 reply; 4+ messages in thread
From: Dave Page @ 2002-05-24 21:27 UTC (permalink / raw)
To: Ramya Asokan <ramya.asokan@wdc.greenpeace.org>; pgsql-admin; pgadmin-support@postgresql.org
> -----Original Message-----
> From: Ramya Asokan [mailto:ramya.asokan@wdc.greenpeace.org]
> Sent: 24 May 2002 21:01
> To: pgsql-admin@postgresql.org; pgadmin-support@postgresql.org
> Subject: [pgadmin-support] Cache lookup error
>
>
> Hi,
> I created a function and a trigger - I then dropped them and
> created the same function and trigger with a different name,
> but i keep getting the error : cache lookup failed. I don't
> know what this means, and would be very grateful if you can
> help me out.
This error may occur if you dropped your function, but not the trigger
(or the trigger failed to drop for some reason). The trigger is still
firing but the cache lookup of the function is failing because it has
gone. This could also happen if your function is dependent on another
function that has since been dropped.
I would suggest first checking that the original trigger was dropped
correctly(and dropping it if not), and if that doesn't solve the
problem, dropping and recreating all the objects again, making sure that
all the dependencies are satisfied.
Regards, Dave.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [ADMIN] Cache lookup error
@ 2002-06-05 22:43 Marc Mitchell <marcm@eisolution.com>
parent: Dave Page <dpage@vale-housing.co.uk>
0 siblings, 0 replies; 4+ messages in thread
From: Marc Mitchell @ 2002-06-05 22:43 UTC (permalink / raw)
To: Dave Page <dpage@vale-housing.co.uk>; Ramya Asokan <ramya.asokan@wdc.greenpeace.org>; pgsql-admin; pgadmin-support@postgresql.org
I've been experiencing this same problem and think I've finally determined
cause.
In our case, this happens after restoring a database with the script that
results from a pg_dumpall with "clean" option. If we have any triggers
that call functions, the tirggering SQL will always result in a "Cache
Lookup Error". Dropping and re-adding the triggers and/or called functions
did not seem to make a difference. However, finally looked deeper into the
schema creation script created by pg_dump:
\connect - postgres
--
-- TOC Entry ID 111 (OID 129228)
--
-- Name: "plpgsql_call_handler" () Type: FUNCTION Owner: postgres
--
CREATE FUNCTION "plpgsql_call_handler" () RETURNS opaque AS
'/usr/lib/pgsql//plp
gsql.so', 'plpgsql_call_handler' LANGUAGE 'C';
--
-- TOC Entry ID 112 (OID 129229)
--
-- Name: plpgsql Type: PROCEDURAL LANGUAGE Owner:
--
CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER "plpgsql_call_handler"
LANC
OMPILER 'PL/pgSQL';
What this shows is that when restoring to a clean database, the script
tries first to create a function and then declare the language used by the
function. Things shoudl be the other way around, should they not?!?
Thus it is not my own triggers and or functions that have broken references
but rather the underlying function handling components where the call
handler function has a broken reference to the language handler.
Would this not be a defect in pg_dump?
For us, the solution was to drop all triggers, functions and then the
language itself via cmdline droplang followed by a cmdline createlang.
With this done, we could add back our functions and triggers.
Marc Mitchell
Enterprise Information Solutions, Inc.
marcm@eisolution.com
----- Original Message -----
From: "Dave Page" <dpage@vale-housing.co.uk>
To: "Ramya Asokan" <ramya.asokan@wdc.greenpeace.org>;
<pgsql-admin@postgresql.org>; <pgadmin-support@postgresql.org>
Sent: Friday, May 24, 2002 4:27 PM
Subject: Re: [ADMIN] [pgadmin-support] Cache lookup error
>
>
> > -----Original Message-----
> > From: Ramya Asokan [mailto:ramya.asokan@wdc.greenpeace.org]
> > Sent: 24 May 2002 21:01
> > To: pgsql-admin@postgresql.org; pgadmin-support@postgresql.org
> > Subject: [pgadmin-support] Cache lookup error
> >
> >
> > Hi,
> > I created a function and a trigger - I then dropped them and
> > created the same function and trigger with a different name,
> > but i keep getting the error : cache lookup failed. I don't
> > know what this means, and would be very grateful if you can
> > help me out.
>
> This error may occur if you dropped your function, but not the trigger
> (or the trigger failed to drop for some reason). The trigger is still
> firing but the cache lookup of the function is failing because it has
> gone. This could also happen if your function is dependent on another
> function that has since been dropped.
>
> I would suggest first checking that the original trigger was dropped
> correctly(and dropping it if not), and if that doesn't solve the
> problem, dropping and recreating all the objects again, making sure that
> all the dependencies are satisfied.
>
> Regards, Dave.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [ADMIN] Cache lookup error
@ 2002-06-06 07:05 Dave Page <dpage@vale-housing.co.uk>
0 siblings, 0 replies; 4+ messages in thread
From: Dave Page @ 2002-06-06 07:05 UTC (permalink / raw)
To: Marc Mitchell <marcm@eisolution.com>; Ramya Asokan <ramya.asokan@wdc.greenpeace.org>; pgsql-admin; pgadmin-support@postgresql.org
> -----Original Message-----
> From: Marc Mitchell [mailto:marcm@eisolution.com]
> Sent: 05 June 2002 23:44
> To: Dave Page; Ramya Asokan; pgsql-admin@postgresql.org;
> pgadmin-support@postgresql.org
> Subject: Re: [ADMIN] [pgadmin-support] Cache lookup error
>
>
> I've been experiencing this same problem and think I've
> finally determined cause.
>
> In our case, this happens after restoring a database with the
> script that results from a pg_dumpall with "clean" option.
> If we have any triggers that call functions, the tirggering
> SQL will always result in a "Cache Lookup Error". Dropping
> and re-adding the triggers and/or called functions did not
> seem to make a difference. However, finally looked deeper
> into the schema creation script created by pg_dump:
>
> \connect - postgres
> --
> -- TOC Entry ID 111 (OID 129228)
> --
> -- Name: "plpgsql_call_handler" () Type: FUNCTION Owner: postgres
> --
>
> CREATE FUNCTION "plpgsql_call_handler" () RETURNS opaque AS
> '/usr/lib/pgsql//plp gsql.so', 'plpgsql_call_handler' LANGUAGE 'C';
>
> --
> -- TOC Entry ID 112 (OID 129229)
> --
> -- Name: plpgsql Type: PROCEDURAL LANGUAGE Owner:
> --
>
> CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER
> "plpgsql_call_handler" LANC OMPILER 'PL/pgSQL';
>
>
> What this shows is that when restoring to a clean database,
> the script tries first to create a function and then declare
> the language used by the function. Things shoudl be the
> other way around, should they not?!?
The plpgsql_call_handler function is the interpreter for the language
and *must* be created before the language itself.
Regards
Dave.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2002-06-06 07:05 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-05-24 20:01 Cache lookup error Ramya Asokan <ramya.asokan@wdc.greenpeace.org>
2002-05-24 21:27 Re: Cache lookup error Dave Page <dpage@vale-housing.co.uk>
2002-06-05 22:43 ` Marc Mitchell <marcm@eisolution.com>
2002-06-06 07:05 Re: [ADMIN] Cache lookup error Dave Page <dpage@vale-housing.co.uk>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox