pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Benjamin Krajmalnik <kraj@illumen.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Determining object name from filenode
Date: Thu, 13 Jul 2006 19:47:44 -0600
Message-ID: <20060714014744.GA90562@winnie.fuhr.org> (raw)
In-Reply-To: <BF337097BDD9D849A2F4B818DDB27987029446@stash.stackdump.local>
References: <BF337097BDD9D849A2F4B818DDB27987029446@stash.stackdump.local>

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



view thread (2+ messages)

Message-ID: <20060714014744.GA90562@winnie.fuhr.org>
Permalink:  ../20060714014744.GA90562@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20060714014744.GA90562@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mike@fuhr.org, kraj@illumen.com
  Subject: Re: Determining object name from filenode
  In-Reply-To: <20060714014744.GA90562@winnie.fuhr.org>
  References: <BF337097BDD9D849A2F4B818DDB27987029446@stash.stackdump.local> <20060714014744.GA90562@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox