Skip site navigation (1) Skip section navigation (2)

Re: dbsize contrib

From: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>,Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: dbsize contrib
Date: 2004-08-29 19:56:25
Message-ID: Pine.LNX.4.58.0408300555460.5698@linuxworld.com.au (view raw or flat)
Thread:
Lists: pgsql-patches
On Sun, 29 Aug 2004, 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)

I sent in a dbsize patch to make these functions tablespace aware...

> 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'

Nice.

Gavin

In response to

Responses

pgsql-patches by date

Next:From: Andreas PflugDate: 2004-08-29 21:53:54
Subject: Re: log_filename_prefix --> log_filename + strftime()
Previous:From: Tom LaneDate: 2004-08-29 19:25:09
Subject: Re: log_filename_prefix --> log_filename + strftime()

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group