Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TsF9E-0007CZ-GU for pgsql-admin@arkaria.postgresql.org; Mon, 07 Jan 2013 16:02:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TsF9D-0004Q9-EX for pgsql-admin@arkaria.postgresql.org; Mon, 07 Jan 2013 16:01:59 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TsF9C-0004Q4-Ri for pgsql-admin@postgresql.org; Mon, 07 Jan 2013 16:01:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TsF9A-0008Bz-Jh for pgsql-admin@postgresql.org; Mon, 07 Jan 2013 16:01:58 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r07G1tgJ010902; Mon, 7 Jan 2013 11:01:55 -0500 (EST) From: Tom Lane To: Greg Schenzel cc: pgsql-admin@postgresql.org Subject: Re: Mapping a Data File Back to a Table In-reply-to: <20130104180933.GA21370@graphite.accessaxis.com> References: <20130104180933.GA21370@graphite.accessaxis.com> Comments: In-reply-to Greg Schenzel message dated "Fri, 04 Jan 2013 11:09:33 -0700" Date: Mon, 07 Jan 2013 11:01:54 -0500 Message-ID: <10901.1357574514@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Greg Schenzel 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