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

dbsize contrib

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>,Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: dbsize contrib
Date: 2004-08-29 10:27:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
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'


Attachment: dbsize.diff
Description: text/x-patch (12.7 KB)


pgsql-patches by date

Next:From: Reini UrbanDate: 2004-08-29 10:49:50
Subject: Re: cygwin 8.0.0beta1 postmaster/syslogger.c, port/dirmod.c,
Previous:From: Andreas PflugDate: 2004-08-29 09:14:54
Subject: Re: log_filename_prefix --> log_filename + strftime()

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