Re: Querying database size

From: "Chris Hoover" <revoohc(at)gmail(dot)com>
To: "Benjamin Krajmalnik" <kraj(at)illumen(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Querying database size
Date: 2006-07-07 17:50:48
Message-ID: 1d219a6f0607071050y4599b1f7w5f416ad72a382e0e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 7/7/06, Benjamin Krajmalnik <kraj(at)illumen(dot)com> wrote:
>
> Is there a query which can be issued which will return the size of a
> database?
> I see that in pgadmin you can get the values on a per table manner.
> I have looced at the pg_catalog schema, but to be truthful I cannot
> figure out how to get that information.
>
> TIA,
>
> Benjamin
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>

select datname, pg_database_size(datname) from pg_database;

This assumes your are running 8.x (might be 8.1.x).

chris

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jeff Frost 2006-07-07 17:54:49 Re: Querying database size
Previous Message Benjamin Krajmalnik 2006-07-07 17:17:08 Querying database size