Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 5BBDF475AD1; Thu, 6 Jun 2002 03:05:13 -0400 (EDT) Received: from anchor-post-30.mail.demon.net (anchor-post-30.mail.demon.net [194.217.242.88]) by postgresql.org (Postfix) with ESMTP id 07689475A8F; Thu, 6 Jun 2002 03:05:10 -0400 (EDT) Received: from mailgate.vale-housing.co.uk ([193.195.77.162] helo=dogbert.vale-housing.co.uk) by anchor-post-30.mail.demon.net with esmtp (Exim 3.35 #1) id 17FrKY-000JiI-0U; Thu, 06 Jun 2002 08:05:10 +0100 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Re: [ADMIN] Cache lookup error X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 Date: Thu, 6 Jun 2002 08:05:09 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [ADMIN] [pgadmin-support] Cache lookup error Thread-Index: AcIM4bcKCjLr51zpR2WNHy46zLUgvgARpMqQ From: "Dave Page" To: "Marc Mitchell" , "Ramya Asokan" , , X-Archive-Number: 200206/14 X-Sequence-Number: 526 > -----Original Message----- > From: Marc Mitchell [mailto:marcm@eisolution.com]=20 > Sent: 05 June 2002 23:44 > To: Dave Page; Ramya Asokan; pgsql-admin@postgresql.org;=20 > pgadmin-support@postgresql.org > Subject: Re: [ADMIN] [pgadmin-support] Cache lookup error >=20 >=20 > I've been experiencing this same problem and think I've=20 > finally determined cause. >=20 > In our case, this happens after restoring a database with the=20 > script that results from a pg_dumpall with "clean" option.=20=20 > If we have any triggers that call functions, the tirggering=20 > SQL will always result in a "Cache Lookup Error". Dropping=20 > and re-adding the triggers and/or called functions did not=20 > seem to make a difference. However, finally looked deeper=20 > into the schema creation script created by pg_dump: >=20 > \connect - postgres > -- > -- TOC Entry ID 111 (OID 129228) > -- > -- Name: "plpgsql_call_handler" () Type: FUNCTION Owner: postgres > -- >=20 > CREATE FUNCTION "plpgsql_call_handler" () RETURNS opaque AS=20 > '/usr/lib/pgsql//plp gsql.so', 'plpgsql_call_handler' LANGUAGE 'C'; >=20 > -- > -- TOC Entry ID 112 (OID 129229) > -- > -- Name: plpgsql Type: PROCEDURAL LANGUAGE Owner: > -- >=20 > CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER=20 > "plpgsql_call_handler" LANC OMPILER 'PL/pgSQL'; >=20 >=20 > What this shows is that when restoring to a clean database,=20 > the script tries first to create a function and then declare=20 > the language used by the function. Things shoudl be the=20 > 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.