Skip site navigation (1) Skip section navigation (2)

db size and tables size difference

From: Isabella Ghiurea <isabella(dot)ghiurea(at)nrc-cnrc(dot)gc(dot)ca>
To: pgsql-admin(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: db size and tables size difference
Date: 2009-09-24 20:26:49
Message-ID: 4ABBD609.5010007@nrc-cnrc.gc.ca (view raw or flat)
Thread:
Lists: pgsql-admin
Tom Lane wrote:
>
> Isabella Ghiurea <isabella(dot)ghiurea(at)nrc-cnrc(dot)gc(dot)ca> writes:
> > The issue may be   with pg_size_pretty()  results, I don't have details
> > knowledge of this function.
>
> I doubt it, that's a pretty simple function ... but if you don't trust
> it, just remove the pg_size_pretty call and look directly at the output
> of the size functions.
>
Hi Tom,
pg_tablespace_size() function shows same size as tables size SQL 
statements close to 6.5 GB , here is output for the  bigest tablespace
select pg_tablespace_size('caom_data');
 pg_tablespace_size
--------------------
         6218108932
select pg_tablespace_size('caom_index');
 pg_tablespace_size
--------------------
          837201924
select pg_tablespace_size('tap_data');
 pg_tablespace_size
--------------------
              65689

select pg_database_size('cvodb');
 pg_database_size
------------------
      13279260268
How can I get more details of  how pg_database_size()  is been executed ?
>
>
> > select pg_size_pretty(pg_database_size('db1'));
>
> Just to double check here ... you're sure you're naming the correct
> database in this call?
>
yes
Thank you
Isabella
>
>                         regards, tom lane
>


-- 
-----------------------------------------------------------
Isabella A. Ghiurea 

Isabella(dot)Ghiurea(at)nrc-cnrc(dot)gc(dot)ca
Canadian Astronomy Data Centre | http://www1.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/ 
National Research Council of Canada, Herzberg Institute of Astrophysics 
5071 West Saanich Road, Victoria BC V9E 2E7, Canada
Phone: 250 363-3446 fax: 250 363-0045


In response to

pgsql-admin by date

Next:From: Mihail NasedkinDate: 2009-09-25 02:58:55
Subject: Re: pg_toast record in table pg_class
Previous:From: Mihail NasedkinDate: 2009-09-24 08:52:49
Subject: pg_toast record in table pg_class

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group