Re: dbsize contrib

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: dbsize contrib
Date: 2004-09-02 00:55:35
Message-ID: 200409020055.i820tZg04676@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Patch applied. Thanks.

Can I get some documentation in the README for all the new
functionality.

---------------------------------------------------------------------------

Andreas Pflug wrote:
> The current implementation of dbsize doesn't handle tables in
> tablespaces correctly, and is quite restricted on objects covered (only
> tables and databases, but not tablespaces and indexes).
>
> The attached patch contributes:
>
> - database_size(name)
> - relation_size(text)
> These are the well-known functions, tablespace-aware.
>
> - pg_tablespace_size(oid)
> - pg_database_size(oid)
> - pg_relation_size(oid)
> Tablespace-aware implementations, used by the upper functions.
> pg_relation_size will report sizes of indexes as well.
>
> - pg_size_pretty(bigint)
> Formatting of sizes, to display '146MB' instead of '152885668'
>
> Regards,
> Andreas
>
>
>
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-09-02 01:04:21 Re: Timezones on localized windows
Previous Message Bruce Momjian 2004-09-01 21:45:21 Re: time_t timezone