Re: Determining object name from filenode

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Benjamin Krajmalnik <kraj(at)illumen(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Determining object name from filenode
Date: 2006-07-14 01:47:44
Message-ID: 20060714014744.GA90562@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Jul 13, 2006 at 06:01:34PM -0600, Benjamin Krajmalnik wrote:
> Is there a way to determine the name of an object based on the filenode
> number?

Use contrib/oid2name or make queries using pg_database.oid and
pg_class.relfilenode. For example, suppose you have the file
$PGDATA/base/16388/640244:

oid2name | grep 16388
oid2name -d dbname -f 640244

or

SELECT datname FROM pg_database WHERE oid = 16388;
\c dbname
SELECT relname FROM pg_class WHERE relfilenode = 640244;

--
Michael Fuhr

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Curtis Preston 2006-07-14 04:35:45 Want to tech review PostgreSQL backup chapter?
Previous Message Benjamin Krajmalnik 2006-07-14 01:30:05 Re: Table size growing for no reason