[XX000] ERROR: could not open relation with OID "someoid"

Поиск
Список
Период
Сортировка
От Artem Tomyuk
Тема [XX000] ERROR: could not open relation with OID "someoid"
Дата
Msg-id CANYYVqL4po7UALYuOfzjpjCmcC1UZ_+auXJ_vudjEbBDLjMV9w@mail.gmail.com
обсуждение исходный текст
Ответы Re: [XX000] ERROR: could not open relation with OID "someoid"
Список pgsql-admin
Hi. 

When i running query (to find the total size of biggest relation in db):

SELECT nspname || '.' || relname AS "relation",
pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size"
FROM pg_class C
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
WHERE nspname NOT IN ('pg_catalog', 'information_schema')
AND C.relkind <> 'i'
AND nspname !~ '^pg_toast'
ORDER BY pg_total_relation_size(C.oid) DESC
LIMIT 20;

I'am often getting the error [XX000] ERROR: could not open relation with OID "someoid". Every time the OID is different.
Some times the query succeeding and i see the result.
This also happens on the slave servers.

Any ideas?
Thank you.

PS
PostgreSQL 9.1.2 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11), 64-bit

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

Предыдущее
От: Scott Whitney
Дата:
Сообщение: Re: Randomly slow queries over TCP, but not on localhost
Следующее
От: Igor Neyman
Дата:
Сообщение: Re: [XX000] ERROR: could not open relation with OID "someoid"