aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/diskusage.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/sgml/diskusage.sgml')
-rw-r--r--doc/src/sgml/diskusage.sgml23
1 files changed, 11 insertions, 12 deletions
diff --git a/doc/src/sgml/diskusage.sgml b/doc/src/sgml/diskusage.sgml
index 385fd93ef11..634b9ab6988 100644
--- a/doc/src/sgml/diskusage.sgml
+++ b/doc/src/sgml/diskusage.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/diskusage.sgml,v 1.14 2005/01/10 00:04:38 tgl Exp $
+$PostgreSQL: pgsql/doc/src/sgml/diskusage.sgml,v 1.15 2005/07/29 14:46:56 momjian Exp $
-->
<chapter id="diskusage">
@@ -31,11 +31,16 @@ $PostgreSQL: pgsql/doc/src/sgml/diskusage.sgml,v 1.14 2005/01/10 00:04:38 tgl Ex
</para>
<para>
- You can monitor disk space from three places: from
- <application>psql</> using <command>VACUUM</> information, from
- <application>psql</> using the tools in <filename>contrib/dbsize</>, and from
- the command line using the tools in <filename>contrib/oid2name</>. Using
- <application>psql</> on a recently vacuumed or analyzed database,
+ You can monitor disk space from three ways: using
+ SQL functions listed in <xref linkend="functions-admin-dbsize">,
+ using <command>VACUUM</> information, and from the command line
+ using the tools in <filename>contrib/oid2name</>. The SQL functions
+ are the easiest to use and report information about tables, tables with
+ indexes and long value storage (TOAST), databases, and tablespaces.
+ </para>
+
+ <para>
+ Using <application>psql</> on a recently vacuumed or analyzed database,
you can issue queries to see the disk usage of any table:
<programlisting>
SELECT relfilenode, relpages FROM pg_class WHERE relname = 'customer';
@@ -102,12 +107,6 @@ SELECT relname, relpages FROM pg_class ORDER BY relpages DESC;
</para>
<para>
- <filename>contrib/dbsize</> loads functions into your database that allow
- you to find the size of a table or database from inside
- <application>psql</> without the need for <command>VACUUM</> or <command>ANALYZE</>.
- </para>
-
- <para>
You can also use <filename>contrib/oid2name</> to show disk usage. See
<filename>README.oid2name</> in that directory for examples. It includes a script that
shows disk usage for each database.