Re: Cache lookup failed? - Mailing list pgsql-general

From Jeff Boes
Subject Re: Cache lookup failed?
Date
Msg-id 1061216262.24447.50.camel@takin.private.nexcerpt.com
Whole thread Raw
In response to Re: Cache lookup failed?  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: Cache lookup failed?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Mon, 2003-08-18 at 09:44, Martijn van Oosterhout wrote:
> It usually refers to some cached plan referring to a table or object that
> does not exist anymore. Do you have stored procedures that refer to tables
> that are deleted? This includes temporary tables.
>
> So maybe it's only happening when a certain stored procedure is executed
> twice in the same session?
>

No, I don't think so. It seems to be pretty consistently happening in
our homegrown database connection class, as we are executing a query
against the PG metadata tables. Something like --

select a.attname, t.typname, a.attlen, a.atttypmod, a.attnotnull,
a.atthasdef, a.attnum
              from pg_attribute a,
                   pg_class     c,
                   pg_type      t
              where c.relname  = ?
                and a.attrelid = c.oid
                and a.attnum  >= 0
                and t.oid      = a.atttypid
                order by 1

This is happening inside DBD::Pg, the "table_attributes" method. The
relname being selected is NOT a temp table. We do make extensive use of
temp tables in the code, however.

--
Jeff Boes                                      vox 269.226.9550 ext 24
Database Engineer                                     fax 269.349.9076
Nexcerpt, Inc.                                 http://www.nexcerpt.com
           ...Nexcerpt... Extend your Expertise


pgsql-general by date:

Previous
From: "Pablo Dall'Oglio"
Date:
Subject: Re: XML?
Next
From: Bjørn T Johansen
Date:
Subject: Hour difference?