Re: Cache lookup failed?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Boes <jboes(at)nexcerpt(dot)com>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Cache lookup failed?
Date: 2003-08-18 21:18:25
Message-ID: 1174.1061241505@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeff Boes <jboes(at)nexcerpt(dot)com> writes:
> 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

I really do not believe that this query could cause "cache lookup failed
for relation-with-a-large-OID". The only relations being directly
touched in this query are pg_attribute, pg_class, pg_type, and their
indexes, which will all have small OIDs (less than 20000). The fact
that you are pulling data that refers to other relations is not relevant
--- it's just data. The "cache lookup" message could only occur when
the system is trying to access a relation as such, and I see nothing
here that would make it do that for any user relations.

It's too bad you're not running 7.4 ... it'd be really useful to know
exactly which "cache lookup" is failing, but there's no way to get that
info out of 7.3 without a debugger stack trace ...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bjørn T Johansen 2003-08-18 21:21:03 Re: Hour difference?
Previous Message Aaron 2003-08-18 21:09:49 Re: newbie and no idea