Discussion:
find table name
(too old to reply)
Ashok Chauhan
2003-12-06 11:34:10 UTC
Permalink
hi
In postgresql all databases are stored in /data/base directory in
numbers form and all the related tables with that database are stored in
that directory again in numbers form.
so there is any command or query to see the original table names.
just like:- select * from pg_stat_database; for databases.

thank you
have a nice day.


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
g***@turnstep.com
2003-12-07 13:12:15 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Ashok Chauhan
In postgresql all databases are stored in /data/base directory in
numbers form and all the related tables with that database are stored in
that directory again in numbers form.
so there is any command or query to see the original table names.
just like:- select * from pg_stat_database; for databases.
You can find the mapping between the "numbers" on disk and the tables by
looking at the "relfilenode", "relname" and "relkind" columns of the
pg_class table. However, it is best to not mess with those files at
all. What are you trying to do?

- --
Greg Sabino Mullane ***@turnstep.com
PGP Key: 0x14964AC8 200312070810

-----BEGIN PGP SIGNATURE-----

iD8DBQE/0yb5vJuQZxSWSsgRAoOMAJ9FZsojXzvCVgrM6Tv0B3f+eI0k8QCg6X8C
fqQi82DmYdZduq4lwADIou0=
=92w+
-----END PGP SIGNATURE-----



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ***@postgresql.org
Thierry Missimilly
2003-12-08 09:33:14 UTC
Permalink
Hi the list,

I used to run oid2name to find the relation between database names and
.../data/base/<dir> but i'm interested also to identify relation between table
names, index names and files number as would try to decrease Wait I/O by
setting tables on one disk and indexes on another one.
The tables pg_class and pg_index do not give the symbolic name with the
"numbers".

Thierry Missimilly.
Post by g***@turnstep.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Ashok Chauhan
In postgresql all databases are stored in /data/base directory in
numbers form and all the related tables with that database are stored in
that directory again in numbers form.
so there is any command or query to see the original table names.
just like:- select * from pg_stat_database; for databases.
You can find the mapping between the "numbers" on disk and the tables by
looking at the "relfilenode", "relname" and "relkind" columns of the
pg_class table. However, it is best to not mess with those files at
all. What are you trying to do?
- --
PGP Key: 0x14964AC8 200312070810
-----BEGIN PGP SIGNATURE-----
iD8DBQE/0yb5vJuQZxSWSsgRAoOMAJ9FZsojXzvCVgrM6Tv0B3f+eI0k8QCg6X8C
fqQi82DmYdZduq4lwADIou0=
=92w+
-----END PGP SIGNATURE-----
---------------------------(end of broadcast)---------------------------
g***@turnstep.com
2003-12-09 00:39:06 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Thierry Missimilly
I used to run oid2name to find the relation between database names and
.../data/base/<dir> but i'm interested also to identify relation between table
names, index names and files number as would try to decrease Wait I/O by
setting tables on one disk and indexes on another one.
The tables pg_class and pg_index do not give the symbolic name with the
"numbers".
This is probably not what you want to do - there are less drastic ways to
get more performance out of PostgreSQL. One thing you can do is move
your WAL files to a different disk, as they are very heavily accessed.
(this is the pg_xlog directory). There are lots of other things that can
help as well - post your hardware and/or queries to the performance list
and you should get some good responses:

http://tinyurl.com/yc2b

- --
Greg Sabino Mullane ***@turnstep.com
PGP Key: 0x14964AC8 200312081935

-----BEGIN PGP SIGNATURE-----

iD8DBQE/1RlYvJuQZxSWSsgRAjV4AJ9uvU5e4yStJSWLhEJZXW/TEiiDGgCgmwKM
rymCF633HioUBJQ0Oj0obZg=
=rf6h
-----END PGP SIGNATURE-----



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ***@postgresql.org
Loading...