Re: List PostgreSQL Databases & Size - DerKeiler Linux Archive

disturbedoctopusData Management

Nov 27, 2012 (4 years and 11 months ago)

200 views

Re: List PostgreSQL Databases & Size
Source: http://linux.derkeiler.com/Newsgroups/linux.redhat.misc/2004−04/0194.html
From: Joseph (csw_at_tm.net.my)
Date: 04/28/04
Date: Wed, 28 Apr 2004 09:10:57 +0800
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" <postmaster@[127.0.0.1]> wrote in message
news:pan.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
linux.redhat.misc: Re: List PostgreSQL Databases & Size
Re: List PostgreSQL Databases & Size 1
> 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
linux.redhat.misc: Re: List PostgreSQL Databases & Size
Re: List PostgreSQL Databases & Size 2