Re: Cache lookup failed?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cache lookup failed?
Дата
Msg-id 1174.1061241505@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Cache lookup failed?  (Jeff Boes <jboes@nexcerpt.com>)
Список pgsql-general
Jeff Boes <jboes@nexcerpt.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Bjørn T Johansen
Дата:
Сообщение: Re: Hour difference?
Следующее
От: Aaron
Дата:
Сообщение: Re: newbie and no idea