|
1 | 1 | <!--
|
2 |
| -$PostgreSQL: pgsql/doc/src/sgml/diskusage.sgml,v 1.14 2005/01/10 00:04:38 tgl Exp $ |
| 2 | +$PostgreSQL: pgsql/doc/src/sgml/diskusage.sgml,v 1.15 2005/07/29 14:46:56 momjian Exp $ |
3 | 3 | -->
|
4 | 4 |
|
5 | 5 | <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
|
31 | 31 | </para>
|
32 | 32 |
|
33 | 33 | <para>
|
34 |
| - You can monitor disk space from three places: from |
35 |
| - <application>psql</> using <command>VACUUM</> information, from |
36 |
| - <application>psql</> using the tools in <filename>contrib/dbsize</>, and from |
37 |
| - the command line using the tools in <filename>contrib/oid2name</>. Using |
38 |
| - <application>psql</> on a recently vacuumed or analyzed database, |
| 34 | + You can monitor disk space from three ways: using |
| 35 | + SQL functions listed in <xref linkend="functions-admin-dbsize">, |
| 36 | + using <command>VACUUM</> information, and from the command line |
| 37 | + using the tools in <filename>contrib/oid2name</>. The SQL functions |
| 38 | + are the easiest to use and report information about tables, tables with |
| 39 | + indexes and long value storage (TOAST), databases, and tablespaces. |
| 40 | + </para> |
| 41 | + |
| 42 | + <para> |
| 43 | + Using <application>psql</> on a recently vacuumed or analyzed database, |
39 | 44 | you can issue queries to see the disk usage of any table:
|
40 | 45 | <programlisting>
|
41 | 46 | SELECT relfilenode, relpages FROM pg_class WHERE relname = 'customer';
|
@@ -101,12 +106,6 @@ SELECT relname, relpages FROM pg_class ORDER BY relpages DESC;
|
101 | 106 | </programlisting>
|
102 | 107 | </para>
|
103 | 108 |
|
104 |
| - <para> |
105 |
| - <filename>contrib/dbsize</> loads functions into your database that allow |
106 |
| - you to find the size of a table or database from inside |
107 |
| - <application>psql</> without the need for <command>VACUUM</> or <command>ANALYZE</>. |
108 |
| - </para> |
109 |
| - |
110 | 109 | <para>
|
111 | 110 | You can also use <filename>contrib/oid2name</> to show disk usage. See
|
112 | 111 | <filename>README.oid2name</> in that directory for examples. It includes a script that
|
|
0 commit comments