Re: Database size in specific metrics - Mailing list pgsql-novice

From Jean-Yves F. Barbier
Subject Re: Database size in specific metrics
Date
Msg-id 20100901130104.19e2a359@anubis.defcon1
Whole thread Raw
In response to Re: Database size in specific metrics  (damien clochard <damien@dalibo.info>)
List pgsql-novice
On Wed, 01 Sep 2010 12:35:02 +0200, damien clochard <damien@dalibo.info>
wrote:

The results isn't exactly accurate, I tried it on my svr:

* your select: 12.0000
* du -sh /var/lib/..../<db_nb by oid2name>/: 13M

NOTE: du -sh gives the *theorical* (bytes) occupation on HD (don't take
      care of disk blocks not entirely filled, so the *real* occupation
      is usually >; might be ~13.5M)

> SELECT  datname,
>     pg_database_size(datname)::float/1024/1024
> FROM pg_database;

--
Q:    Why don't lawyers go to the beach?
A:    The cats keep trying to bury them.

pgsql-novice by date:

Previous
From: damien clochard
Date:
Subject: Re: Database size in specific metrics
Next
From: Josh Kupershmidt
Date:
Subject: Re: Postgresql security checks