Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2011
    Posts
    16

    Unanswered: PostgreSQL Tables under $PGDATA/base and $PGDATA/global directories

    Hi,

    Under $PGDATA/base/database directory, there are list of tables and indexes. For example,
    ------------------------------------------------------------
    -bash-3.2$ cd base
    -bash-3.2$ ls
    1 11866 11874 33656 58557 pgsql_tmp
    -bash-3.2$ cd 1
    -bash-3.2$ ls
    11581 11626 11658 11733 11799 11835
    11581_fsm 11627 11659 11734 11800 11836
    11581_vm 11627_fsm 11660 11735 11801 11836_fsm
    11583 11627_vm 11660_fsm 11736 11801_fsm 11836_vm
    11583_fsm 11629 11660_vm 11736_fsm 11801_vm 11838
    11583_vm 11631 11662 11736_vm 11803 11840
    11585 11632 11663 11738 11804 11841
    11592 11633 11664 11740 11804_fsm 11841_fsm
    11593 11634 11665 11741 11804_vm 11841_vm
    11593_fsm 11635 11665_fsm 11742 11806 11843
    11593_vm 11636 11665_vm 11742_fsm 11807 11845
    11595 11638 11667 11742_vm 11808 11846
    11596 11639 11668 11744 11808_fsm 11846_fsm
    11597 11640 11669 11745 11808_vm 11846_vm
    11597_fsm 11640_fsm 11669_fsm 11746 11810 11848
    11597_vm 11640_vm 11669_vm 11748 11811 11850
    11599 11642 11671 11749 11812 11851
    11600 11643 11672 11750 11812_fsm 11851_fsm
    11605 11644 11673 11750_fsm 11812_vm 11851_vm
    11607 11644_fsm 11675 11750_vm 11814 11853
    11608 11644_vm 11676 11752 11815 11855
    11609 11646 11676_fsm 11753 11816 11856
    11609_fsm 11647 11676_vm 11754 11818 11856_fsm
    11609_vm 11648 11678 11754_fsm 11819 11856_vm
    11611 11648_fsm 11679 11754_vm 11820 11858
    11613 11648_vm 11679_fsm 11756 11822 11860
    11614 11650 11679_vm 11757 11823 11861
    11615 11651 11681 11758 11824 11863
    11616 11652 11681_fsm 11759 11826 11865
    11616_fsm 11652_fsm 11681_vm 11759_fsm 11827 pg_filenode.map
    11618 11652_vm 11683 11759_vm 11828 PG_VERSION
    11619 11654 11726 11761 11830
    11620 11655 11727 11762 11831
    11622 11656 11728 11797 11831_fsm
    11624 11656_fsm 11730 11797_fsm 11831_vm
    11625 11656_vm 11732 11797_vm 11833
    -bash-3.2$
    ------------------------------------------------------------

    I have created a table and the table can be selected from pg_class.
    However based on the $PGDATA/base/database directory listing most of the files listed under this directory cannot be found in the pg_class table.

    What are the other files listed under $PGDATA/base/database directory. Can the tables' name under this directory be listed using 'SELECT STATEMENT' ?

    Similar to $PGDATA/global directory. What are the other files listed under $PGDATA/global directory. Can the tables' name under this directory be listed using 'SELECT STATEMENT' as well?

    Regards,
    Eye Gee

  2. #2
    Join Date
    Oct 2011
    Posts
    16

    PostgreSQL Tables under $PGDATA/base and $PGDATA/global directories

    Hi anhhunglove123,

    Thank you for the reply. However I could not read and interpret the message. Please type in English.

    Regards,
    Eye Gee

  3. #3
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by kuaeg View Post
    Similar to $PGDATA/global directory. What are the other files listed under $PGDATA/global directory. Can the tables' name under this directory be listed using 'SELECT STATEMENT' as well?
    Why do you want to do that? What are you trying to achieve?


    Are you aware of this: http://www.postgresql.org/docs/curre...isk-usage.html
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags: http://www.dbforums.com/misc.php?do=bbcode#code

    Tips for good questions:

    http://tkyte.blogspot.de/2005/06/how...questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html

  4. #4
    Join Date
    Oct 2011
    Posts
    16

    PostgreSQL Tables under $PGDATA/base and $PGDATA/global directories

    Hi shammat,

    Sorry that my posting is not clearly explained.

    =====================================
    I have tried to using the following select:

    "select oid,relname from pg_class"

    in order to obtain the table I created under $PGDATA/base.

    However under this directory there are other files such as

    11581 11626 11658 11733 11799 11835
    11581_fsm 11627 11659 11734 11800 11836

    which could not be retrieved from the pg_class.
    =====================================

    I would like to know what the other files are, such as 11581 11626 11658...
    Similar to $PGDATA/global directory. Is there a way to obtain the table name based on the file ?

    Regards,
    Eye Gee

  5. #5
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Again: why do you need this? What are you trying to achieve?
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags: http://www.dbforums.com/misc.php?do=bbcode#code

    Tips for good questions:

    http://tkyte.blogspot.de/2005/06/how...questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html

  6. #6
    Join Date
    Oct 2011
    Posts
    16

    PostgreSQL Tables under $PGDATA/base and $PGDATA/global directories

    Hi shammat,

    I would like to have a more detail understanding of postgreSQL.
    If you have any ideas on these files under $PGDATA/base and $PGDATA/global, kindly share.

    Thanks.

    Regards,
    Eye Gee

  7. #7
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by kuaeg View Post
    I would like to have a more detail understanding of postgreSQL.
    If you have any ideas on these files under $PGDATA/base and $PGDATA/global, kindly share.
    In that case you are probably better off asking this question on one of the Postgres mailing lists (e.g. -hackers) or study the source code
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags: http://www.dbforums.com/misc.php?do=bbcode#code

    Tips for good questions:

    http://tkyte.blogspot.de/2005/06/how...questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •