Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 358a897

Browse files
committed
Move dbsize functions into the backend. New functions:
pg_tablespace_size pg_database_size pg_relation_size pg_complete_relation_size pg_size_pretty Remove /contrib/dbsize. Dave Page
1 parent b05801c commit 358a897

File tree

10 files changed

+620
-615
lines changed

10 files changed

+620
-615
lines changed

contrib/Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/Makefile,v 1.57 2005/07/01 19:23:04 tgl Exp $
1+
# $PostgreSQL: pgsql/contrib/Makefile,v 1.58 2005/07/29 14:46:55 momjian Exp $
22

33
subdir = contrib
44
top_builddir = ..
@@ -11,7 +11,6 @@ WANTED_DIRS = \
1111
dbase \
1212
dblink \
1313
dbmirror \
14-
dbsize \
1514
earthdistance \
1615
fulltextindex \
1716
fuzzystrmatch \

contrib/dbsize/Makefile

-13
This file was deleted.

contrib/dbsize/README.dbsize

-115
This file was deleted.

contrib/dbsize/dbsize.sql.in

-132
This file was deleted.

doc/src/sgml/diskusage.sgml

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
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 $
33
-->
44

55
<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
3131
</para>
3232

3333
<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,
3944
you can issue queries to see the disk usage of any table:
4045
<programlisting>
4146
SELECT relfilenode, relpages FROM pg_class WHERE relname = 'customer';
@@ -101,12 +106,6 @@ SELECT relname, relpages FROM pg_class ORDER BY relpages DESC;
101106
</programlisting>
102107
</para>
103108

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-
110109
<para>
111110
You can also use <filename>contrib/oid2name</> to show disk usage. See
112111
<filename>README.oid2name</> in that directory for examples. It includes a script that

0 commit comments

Comments
 (0)