Re: could not read block 0 in file "base/mydb/myfile": read only 0 of 8192 bytes

"Daniel Verite" <[email protected]>
Newsgroups gmane.comp.db.postgresql.french
Message-ID <8ced95cc-1155-4ce8-a4f0-4a8d8dfbf2e6@mm>
	Michael JOIGNY wrote:

> Peut-on identifier précisément si c'est une table, un index ou une vue ?

Dans ce message:

could not read block 0 in file 
"base/16583/12119463": read only 0 of 8192 bytes

Le premier nombre: 16583 est l'OID de la base
et le deuxième est le relfilenode de la relation.

Pour identifier la base en question:
select datname from pg_database where oid=16583;

Une fois connecté à cette base, pour retrouver l'objet auquel
correspond ce fichier:

select * from pg_class where relfilenode=12119463;

ou, en plus fin:

select 
    n.nspname AS schename, 
    c.relname,
    c.relkind
from pg_class c
 join pg_namespace n on (c.relnamespace = n.oid)
where c.relfilenode = 12119463;

relkind donnera le type de la relation, table ou index ou autre,
voir la doc pour les champs de pg_class plus généralement.

Cordialement,
-- 
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite


--
Envoi via la liste pgsql-fr-generale ([email protected])
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.