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: | 4131AF92.3080107@pse-consulting.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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'
Regards,
Andreas
Attachment | Content-Type | Size |
---|---|---|
dbsize.diff | text/x-patch | 12.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Reini Urban | 2004-08-29 10:49:50 | Re: cygwin 8.0.0beta1 postmaster/syslogger.c, port/dirmod.c, |
Previous Message | Andreas Pflug | 2004-08-29 09:14:54 | Re: log_filename_prefix --> log_filename + strftime() |