Hi. When i running query (to find the total size of biggest relation in db): SELECT nspname || '.' || relname AS "relation", 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 If you want to exclude TOAST tables and indexes, instead of
AND C.relkind <> 'i' just do: AND C.relkind = ‘r’ --
ordinary table But, your error probably is caused by temporary tables, so to exclude those just add: AND c.relpersistence != ‘t’ Regards, Igor Neyman |