db size and tables size difference - Mailing list pgsql-admin

From Isabella Ghiurea
Subject db size and tables size difference
Date
Msg-id 4ABBD609.5010007@nrc-cnrc.gc.ca
Whole thread Raw
In response to Re: db size and tables size difference  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
Tom Lane wrote:
>
> Isabella Ghiurea <isabella.ghiurea@nrc-cnrc.gc.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.Ghiurea@nrc-cnrc.gc.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


pgsql-admin by date:

Previous
From: Mihail Nasedkin
Date:
Subject: pg_toast record in table pg_class
Next
From: Mihail Nasedkin
Date:
Subject: Re: pg_toast record in table pg_class