List PostgreSQL Databases & Size - Redhat

This is a discussion on List PostgreSQL Databases & Size - Redhat ; Anyone have any idea how do I 1. List all the PostgeSQL databases and the size of each databases ? -- --- Best Regard, JOSEPH...

+ Reply to Thread
Results 1 to 5 of 5

Thread: List PostgreSQL Databases & Size

  1. List PostgreSQL Databases & Size

    Anyone have any idea how do I
    1. List all the PostgeSQL databases and the size of each databases ?

    --
    ---
    Best Regard,

    JOSEPH




  2. Re: List PostgreSQL Databases & Size

    On Mon, 26 Apr 2004 16:33:34 +0800, Joseph wrote:

    > Anyone have any idea how do I
    > 1. List all the PostgeSQL databases and the size of each databases ?


    Can't you just cd and do du (man du for the switch to
    prevent recursion to subdirs)

    That is how I do it with mysql.

    Regards,
    Dave


  3. Re: List PostgreSQL Databases & Size

    I need to list all the database name with size.

    du command does not shown which database and it's size.


    "Dave Millen" wrote in message
    newsan.2004.04.26.11.55.09.512634@[127.0.0.1]...
    > On Mon, 26 Apr 2004 16:33:34 +0800, Joseph wrote:
    >
    > > Anyone have any idea how do I
    > > 1. List all the PostgeSQL databases and the size of each databases ?

    >
    > Can't you just cd and do du (man du for the switch to
    > prevent recursion to subdirs)
    >
    > That is how I do it with mysql.
    >
    > Regards,
    > Dave
    >




  4. Re: List PostgreSQL Databases & Size

    On Tue, 27 Apr 2004 16:14:20 +0800, Joseph wrote:

    > I need to list all the database name with size.
    >
    > du command does not shown which database and it's size.
    >
    >


    Does PostgreSQL not store its databases in directories under the top
    level named after the database in the same way that MySQL does? I haven't
    used it for a couple of years, but I thought that it did.

    This is how I do it for MySQL:

    [root@mybox root]# cd /var/lib/mysql
    [root@mybox mysql]# du -h
    48K ./winweb
    84K ./test
    108K ./mysql.ORIGINAL
    92K ./shop
    100K ./Promisance
    92K ./phorum4
    112K ./phorum
    196K ./p21shop
    188K ./p21print
    728K ./p21
    2.7M ./NewAgeConnections
    148K ./mysql
    292K ./models
    208K ./messages
    712K ./internet
    4.0K ./internalsite
    4.0K ./info
    24K ./guestbook
    1.1M ./forum34
    64K ./djmsoft
    4.0K ./amaccom
    160K ./3sevens
    168K ./restaurant
    24K ./test2
    64K ./aveburycircle
    19M .
    [root@mybox mysql]#

    All the above are the MySQL databases on this development machine.

    Regards,
    Dave

  5. Re: List PostgreSQL Databases & Size

    Sorry mate,

    For PostgreSQL, all the database are in numeric format,

    Example:
    [root@mybox root]# cd /var/lib/pgsql/data/base
    [root@mybox base]# du -h
    1.7M ./1
    1.7M ./16555
    4.0k ./39443047/pgsql_tmp
    47M ./39443047
    4.0k ./6855383/pgsql_tmp
    137M ./6855383
    ......


    "Dave Millen" wrote in message
    newsan.2004.04.27.10.08.34.175645@[127.0.0.1]...
    > On Tue, 27 Apr 2004 16:14:20 +0800, Joseph wrote:
    >
    > > I need to list all the database name with size.
    > >
    > > du command does not shown which database and it's size.
    > >
    > >

    >
    > Does PostgreSQL not store its databases in directories under the top
    > level named after the database in the same way that MySQL does? I haven't
    > used it for a couple of years, but I thought that it did.
    >
    > This is how I do it for MySQL:
    >
    > [root@mybox root]# cd /var/lib/mysql
    > [root@mybox mysql]# du -h
    > 48K ./winweb
    > 84K ./test
    > 108K ./mysql.ORIGINAL
    > 92K ./shop
    > 100K ./Promisance
    > 92K ./phorum4
    > 112K ./phorum
    > 196K ./p21shop
    > 188K ./p21print
    > 728K ./p21
    > 2.7M ./NewAgeConnections
    > 148K ./mysql
    > 292K ./models
    > 208K ./messages
    > 712K ./internet
    > 4.0K ./internalsite
    > 4.0K ./info
    > 24K ./guestbook
    > 1.1M ./forum34
    > 64K ./djmsoft
    > 4.0K ./amaccom
    > 160K ./3sevens
    > 168K ./restaurant
    > 24K ./test2
    > 64K ./aveburycircle
    > 19M .
    > [root@mybox mysql]#
    >
    > All the above are the MySQL databases on this development machine.
    >
    > Regards,
    > Dave




+ Reply to Thread