From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Schenzel <inittab@unixdev.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Mapping a Data File Back to a Table
Date: Mon, 07 Jan 2013 11:01:54 -0500
Message-ID: <10901.1357574514@sss.pgh.pa.us> (raw)
In-Reply-To: <20130104180933.GA21370@graphite.accessaxis.com>
References: <20130104180933.GA21370@graphite.accessaxis.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Greg Schenzel <inittab@unixdev.net> writes:
> So I've been digging through a database on an embedded device for two
> days trying to figure out which table some data is stored in. There
> are litterally 1000 tables in the database and I haven't come across
> the right one(s) yet. I know that the data I'm looking for is stored
> in /var/lib/pgsql/data/base/16384/2613 from strings and grep. Is there
> any way to map this back to a table or group of tables? Any insight
> would be greatly appreciated!
Just for the record, the 16384 is the OID of a database (look at
pg_database.oid) and 2613 is the filenode of a table (look at
pg_class.relfilenode in the relevant database). contrib/oid2name
can help mechanize this but personally I never bother with that.
See http://www.postgresql.org/docs/9.2/static/storage.html
for the authoritative skinny (but note this stuff does change
across releases, so be sure to read the correct version of the docs).
regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, inittab@unixdev.net
Subject: Re: Mapping a Data File Back to a Table
In-Reply-To: <10901.1357574514@sss.pgh.pa.us>
* 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