pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedMapping a Data File Back to a Table
3+ messages / 2 participants
[nested] [flat]
* Mapping a Data File Back to a Table
@ 2013-01-04 18:09 Greg Schenzel <inittab@unixdev.net>
0 siblings, 2 replies; 3+ messages in thread
From: Greg Schenzel @ 2013-01-04 18:09 UTC (permalink / raw)
To: pgsql-admin
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!
Attachments:
signature.asc (application/pgp-signature, 197B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Mapping a Data File Back to a Table
@ 2013-01-04 18:46 Greg Schenzel <inittab@unixdev.net>
parent: Greg Schenzel <inittab@unixdev.net>
1 sibling, 0 replies; 3+ messages in thread
From: Greg Schenzel @ 2013-01-04 18:46 UTC (permalink / raw)
To: pgsql-admin
It was stored in pg_largeobject based on the OID.
On Fri, Jan 04, 2013 at 11:09:33AM -0700, Greg Schenzel wrote:
> 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!
>
Attachments:
signature.asc (application/pgp-signature, 197B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Mapping a Data File Back to a Table
@ 2013-01-07 16:01 Tom Lane <tgl@sss.pgh.pa.us>
parent: Greg Schenzel <inittab@unixdev.net>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2013-01-07 16:01 UTC (permalink / raw)
To: Greg Schenzel <inittab@unixdev.net>; +Cc: pgsql-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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2013-01-07 16:01 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-01-04 18:09 Mapping a Data File Back to a Table Greg Schenzel <inittab@unixdev.net>
2013-01-04 18:46 ` Greg Schenzel <inittab@unixdev.net>
2013-01-07 16:01 ` Tom Lane <tgl@sss.pgh.pa.us>
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