Re: how to know the current size of a database - Mailing list pgsql-general

From Decibel!
Subject Re: how to know the current size of a database
Date
Msg-id 0BCD6C8C-E1F9-44AC-82E3-EF0F9C2696EE@decibel.org
Whole thread Raw
In response to how to know the current size of a database  (son@raider.co.nz)
List pgsql-general
On Sep 19, 2007, at 5:36 AM, son@raider.co.nz wrote:
> I want to know about the size of my database. For example, I want
> to know
> how many Mb of data for current myDatabase database in a postgres
> server.

If you don't need an exact size, this query will be a lot faster than
the size functions:

SELECT pg_size_pretty(sum(relpages)*8192) FROM pg_class;
--
Decibel!, aka Jim C. Nasby, Database Architect  decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828



pgsql-general by date:

Previous
From: Decibel!
Date:
Subject: Re: Is this good spec for a PostgreSQL server?
Next
From: Erik Jones
Date:
Subject: Re: For index bloat: VACUUM ANALYZE vs REINDEX/CLUSTER