Re: ERROR: could not open relation with OID 2836

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ERROR: could not open relation with OID 2836
Дата
Msg-id 4265.1214584328@sss.pgh.pa.us
обсуждение исходный текст
Ответ на ERROR: could not open relation with OID 2836  (Rodrigo Gonzalez <rjgonzale@gmail.com>)
Ответы Re: ERROR: could not open relation with OID 2836  (Rodrigo Gonzalez <rjgonzale@gmail.com>)
Список pgsql-general
Rodrigo Gonzalez <rjgonzale@gmail.com> writes:
> pg_dump is working fine now, the problem appear with the pg_buffercache
> query...without it I dont notice anything wrong with DB....but of course
> there is something wrong. Can be pg_buffercache the problem?

Oh ... looking again at your latest problem query, the query is buggy:

db=# SELECT ... pg_relation_size(c.relname) ...
FROM pg_class c INNER JOIN pg_buffercache b ON b.relfilenode = c.relfilenode ...
ERROR:  relation "pg_toast_1255" does not exist

The pg_toast schema isn't in your search path so you can't just do
"pg_relation_size(c.relname)".  You'd be better off using
pg_relation_size(c.oid) anyway.

I was misled by the chance coincidence that pg_proc's toast table was
the one mentioned, otherwise I'd probably have seen this sooner.

So this is not a bug, and not related to the original problem.  We still
don't know what the original problem was, but I wonder if it might have
been of the same ilk.  I don't think you ever showed us the exact query
that led to the "could not open relation" message?

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: compiling, performance of PostGreSQL 8.3 on 64-bit processors
Следующее
От: "Douglas McNaught"
Дата:
Сообщение: Re: compiling, performance of PostGreSQL 8.3 on 64-bit processors