How do I track down what relation is stored in a given file in data? I'm
trying to clean up this database before doing an export/import and I'm stumped
trying to figure out what this 400M relation is:
bash-2.05b# ls -h -l --sort=size | head
total 632M
-rw------- 1 postgres postgres 402M Mar 4 19:16 2514073
-rw------- 1 postgres postgres 37M Mar 23 03:25 27077
-rw------- 1 postgres postgres 33M Mar 23 03:11 27071
-rw------- 1 postgres postgres 24M Mar 25 16:34 27012
-rw------- 1 postgres postgres 20M Mar 23 03:25 2511860
db=# select * from pg_class where oid = 2514073;
relname | relnamespace | reltype | relowner | relam | relfilenode | relpages | reltuples | reltoastrelid |
reltoastidxid| relhasindex | relisshared | relkind | relnatts | relchecks | reltriggers | relukeys | relfkeys | relrefs
|relhasoids | relhaspkey | relhasrules | relhassubclass | relacl
---------+--------------+---------+----------+-------+-------------+----------+-----------+---------------+---------------+-------------+-------------+---------+----------+-----------+-------------+----------+----------+---------+------------+------------+-------------+----------------+--------
(0 rows)
--
greg