Thread: Re: database size

Re: database size

From
"philip johnson"
Date:
Yesterday when I saw that it wasn't in tar file
I went to cvs tree, and got thoses file
It's seems that there are some modification in source tree
and it's not possible to get a valid compilation

people from postgresql, could you explain me how to do it
with a source tar 7.2.1 ?

thanks in advance

-----Message d'origine-----
De : David Blood [mailto:david@matraex.com]
Envoye : jeudi 20 juin 2002 19:34
A : 'philip johnson'
Objet : RE: [GENERAL] database size


See
http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dbsize/

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of philip johnson
Sent: Thursday, June 20, 2002 11:07 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] database size
Importance: High

someone could answer to my question ?

-----Message d'origine-----
De : pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]De la part de philip johnson
Envoye : mercredi 19 juin 2002 18:57
A : Lee Kindness
Cc : pgsql-general@postgresql.org
Objet : Re: [GENERAL] database size
Importance : Haute


I've extracted the file postgresql-7.2.1.tar.gz and I can't find the
dbsize directory

-----Message d'origine-----
De : Lee Kindness [mailto:lkindness@csl.co.uk]
Envoye : mercredi 19 juin 2002 18:12
A : philip johnson
Cc : Lee Kindness; pgsql-general@postgresql.org
Objet : RE: [GENERAL] database size


See:

 contrib/dbsize/README.dbsize

in the source archive.

Lee.

philip johnson writes:
 > sorry forgot to say that I'm using source file to generate postgresql
7.2.1
 > I've search in contrib and I can't find it
 >
 > -----Message d'origine-----
 > De : pgsql-general-owner@postgresql.org
 > [mailto:pgsql-general-owner@postgresql.org]De la part de Lee Kindness
 > Envoye : mercredi 19 juin 2002 16:04
 > A : philip johnson
 > Cc : pgsql-general@postgresql.org; Lee Kindness
 > Objet : [GENERAL] database size
 >
 > See contrib/dbsize in the source archive, or it should be installed
if
 > you installed the contrib RPM (assuming Linux).
 >
 > Lee.
 >
 > philip johnson writes:
 >  > how can I get the size of my database
 >  > and table size in MB?


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)





Re: database size

From
Alvaro Herrera
Date:
philip johnson dijo:

> Yesterday when I saw that it wasn't in tar file
> I went to cvs tree, and got thoses file
> It's seems that there are some modification in source tree
> and it's not possible to get a valid compilation
>
> people from postgresql, could you explain me how to do it
> with a source tar 7.2.1 ?

One way is to get the OID of the database in question:
SELECT oid FROM pg_database WHERE datname='<your-database>';

Then go to $DATA/base/<oid-you-just-got> and look at the size of that
directory.

There's also contrib/oid2name that you can use to look at what each file
corresponds to.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"La paz mas desventajosa es mejor que la guerra mas justa"