From: | "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> |
---|---|
To: | "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | For review: dbsize patch |
Date: | 2005-06-27 15:10:09 |
Message-ID: | E7F85A1B5FF8D44C8A1AF6885BC9A0E490E760@ratbert.vale-housing.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
The attached patch is an update of the dbsize integration patch
discussed last week. This version includes the following functions:
pg_relation_size(text) - Get relation size by name/schema.name
pg_relation_size(oid) - Get relation size by OID
pg_tablespace_size(name) - Get tablespace size by name
pg_tablespace_size(oid) - Get tablespace size by OID
pg_database_size(name) - Get database size by name
pg_database_size(oid) - Get database size by OID
pg_size_pretty(int8) - Pretty print (and round) the byte size
specified (eg, 123456 = 121KB)
The only remaining function that last week's brief discussion indicated
was required is a replacement for total_relation_size() (or
pg_table_size() as it might now be called). I didn't realise until a few
minutes ago that this function (which is actually broken because it
doesn't handle schemas) was only committed a couple of months ago (v1.5,
http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dbsize/dbsize.s
ql.in) and has therefore never been in a release version.
So should we include this new feature, and if so, how is it best added -
rewrite in C, or one long line in pg_proc?
Regards, Dave
Attachment | Content-Type | Size |
---|---|---|
dbsize.c | application/octet-stream | 8.1 KB |
dbsize.patch | application/octet-stream | 8.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Teodor Sigaev | 2005-06-27 15:12:09 | Re: tsearch2 vs core? |
Previous Message | Bruno Wolff III | 2005-06-27 14:57:51 | Re: Fixing r-tree semantics |