~ubuntu-branches/debian/squeeze/pgadmin3/squeeze

« back to all changes in this revision

Viewing changes to docs/en_US/pg/app-clusterdb.html

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Porcheron
  • Date: 2008-02-07 00:56:22 UTC
  • mto: (2.1.6 hardy) (6.1.2 sid)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20080207005622-c2ail8p4d0sk3dnw
Tags: upstream-1.8.2
Import upstream version 1.8.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html>
2
 
<head>
3
 
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4
 
<title>clusterdb</title>
5
 
<link rel="stylesheet" href="stylesheet.css" type="text/css">
6
 
<link rev="made" href="pgsql-docs@postgresql.org">
7
 
<meta name="generator" content="DocBook XSL Stylesheets V1.70.0">
8
 
<link rel="start" href="index.html" title="PostgreSQL 8.1.4 Documentation">
9
 
<link rel="up" href="reference-client.html" title="PostgreSQL Client Applications">
10
 
<link rel="prev" href="reference-client.html" title="PostgreSQL Client Applications">
11
 
<link rel="next" href="app-createdb.html" title="createdb">
12
 
<link rel="copyright" href="ln-legalnotice.html" title="Legal Notice">
13
 
</head>
14
 
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
15
 
<a name="app-clusterdb"></a><div class="titlepage"></div>
16
 
<div class="refnamediv">
17
 
<h2>Name</h2>
18
 
<p>clusterdb &#8212; cluster a <span class="productname">PostgreSQL</span> database</p>
19
 
</div>
20
 
<a name="id791263"></a><div class="refsynopsisdiv">
21
 
<h2>Synopsis</h2>
22
 
<div class="cmdsynopsis"><p><code class="command">clusterdb</code> [<em class="replaceable"><code>connection-option</code></em>...] [--table | -t <em class="replaceable"><code>table</code></em> ] [<em class="replaceable"><code>dbname</code></em>]<br><code class="command">clusterdb</code> [<em class="replaceable"><code>connection-option</code></em>...] [[--all] |  [-a]]</p></div>
23
 
</div>
24
 
<div class="refsect1" lang="en">
25
 
<a name="id791347"></a><h2>Description</h2>
26
 
<p>   <span class="application">clusterdb</span> is a utility for reclustering tables
27
 
   in a <span class="productname">PostgreSQL</span> database.  It finds tables
28
 
   that have previously been clustered, and clusters them again on the same
29
 
   index that was last used.  Tables that have never been clustered are not
30
 
   affected.
31
 
  </p>
32
 
<p>   <span class="application">clusterdb</span> is a wrapper around the SQL
33
 
   command <a href="sql-cluster.html">CLUSTER</a>.
34
 
   There is no effective difference between clustering databases via
35
 
   this utility and via other methods for accessing the server.
36
 
  </p>
37
 
</div>
38
 
<div class="refsect1" lang="en">
39
 
<a name="id791394"></a><h2>Options</h2>
40
 
<p>    <span class="application">clusterdb</span> accepts the following command-line arguments:
41
 
    
42
 
    </p>
43
 
<div class="variablelist"><dl>
44
 
<dt>
45
 
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="option">-a</code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="option">--all</code></span>
46
 
</dt>
47
 
<dd><p> Cluster all databases.
48
 
       </p></dd>
49
 
<dt>
50
 
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="option">[<span class="optional">-d</span>] <em class="replaceable"><code>dbname</code></em></code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="option">[<span class="optional">--dbname</span>] <em class="replaceable"><code>dbname</code></em></code></span>
51
 
</dt>
52
 
<dd><p> Specifies the name of the database to be clustered.
53
 
        If this is not specified and <code class="option">-a</code> (or
54
 
        <code class="option">--all</code>) is not used, the database name is read
55
 
        from the environment variable <code class="envar">PGDATABASE</code>.  If
56
 
        that is not set, the user name specified for the connection is
57
 
        used.
58
 
       </p></dd>
59
 
<dt>
60
 
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="option">-e</code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="option">--echo</code></span>
61
 
</dt>
62
 
<dd><p>        Echo the commands that <span class="application">clusterdb</span> generates
63
 
        and sends to the server.
64
 
       </p></dd>
65
 
<dt>
66
 
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="option">-q</code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="option">--quiet</code></span>
67
 
</dt>
68
 
<dd><p>        Do not display a response.
69
 
       </p></dd>
70
 
<dt>
71
 
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="option">-t <em class="replaceable"><code>table</code></em></code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="option">--table <em class="replaceable"><code>table</code></em></code></span>
72
 
</dt>
73
 
<dd><p> Cluster <em class="replaceable"><code>table</code></em> only.
74
 
       </p></dd>
75
 
</dl></div>
76
 
<p>
77
 
   </p>
78
 
<p>    <span class="application">clusterdb</span> also accepts 
79
 
    the following command-line arguments for connection parameters:
80
 
 
81
 
    </p>
82
 
<div class="variablelist"><dl>
83
 
<dt>
84
 
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="option">-h <em class="replaceable"><code>host</code></em></code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="option">--host <em class="replaceable"><code>host</code></em></code></span>
85
 
</dt>
86
 
<dd><p> Specifies the host name of the machine on which the server is
87
 
        running.  If the value begins with a slash, it is used as the
88
 
        directory for the Unix domain socket.
89
 
       </p></dd>
90
 
<dt>
91
 
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="option">-p <em class="replaceable"><code>port</code></em></code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="option">--port <em class="replaceable"><code>port</code></em></code></span>
92
 
</dt>
93
 
<dd><p> Specifies the TCP port or local Unix domain socket file 
94
 
        extension on which the server
95
 
        is listening for connections.
96
 
       </p></dd>
97
 
<dt>
98
 
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="option">-U <em class="replaceable"><code>username</code></em></code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="option">--username <em class="replaceable"><code>username</code></em></code></span>
99
 
</dt>
100
 
<dd><p>        User name to connect as.
101
 
       </p></dd>
102
 
<dt>
103
 
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="option">-W</code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="option">--password</code></span>
104
 
</dt>
105
 
<dd><p>        Force password prompt.
106
 
       </p></dd>
107
 
</dl></div>
108
 
<p>
109
 
   </p>
110
 
</div>
111
 
<div class="refsect1" lang="en">
112
 
<a name="id791630"></a><h2>Environment</h2>
113
 
<div class="variablelist"><dl>
114
 
<dt>
115
 
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="envar">PGDATABASE</code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="envar">PGHOST</code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="envar">PGPORT</code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="envar">PGUSER</code></span>
116
 
</dt>
117
 
<dd><p>      Default connection parameters
118
 
     </p></dd>
119
 
</dl></div>
120
 
</div>
121
 
<div class="refsect1" lang="en">
122
 
<a name="id791656"></a><h2>Diagnostics</h2>
123
 
<p>   In case of difficulty, see <a href="sql-cluster.html">CLUSTER</a> and <a href="app-psql.html" title="psql"><span class="refentrytitle"><a name="app-psql-title"></a><span class="application">psql</span></span></a> for
124
 
   discussions of potential problems and error messages.
125
 
   The database server must be running at the
126
 
   targeted host.  Also, any default connection settings and environment
127
 
   variables used by the <span class="application">libpq</span> front-end
128
 
   library will apply.
129
 
  </p>
130
 
</div>
131
 
<div class="refsect1" lang="en">
132
 
<a name="id791692"></a><h2>Examples</h2>
133
 
<p>    To cluster the database <code class="literal">test</code>:
134
 
</p>
135
 
<pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>clusterdb test</code></strong></pre>
136
 
<p>
137
 
   </p>
138
 
<p>    To cluster a single table
139
 
    <code class="literal">foo</code> in a database named
140
 
    <code class="literal">xyzzy</code>:
141
 
</p>
142
 
<pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>clusterdb --table foo xyzzy</code></strong></pre>
143
 
<p>
144
 
   </p>
145
 
</div>
146
 
<div class="refsect1" lang="en">
147
 
<a name="id791751"></a><h2>See Also</h2>
148
 
<span class="simplelist"><a href="sql-cluster.html">CLUSTER</a>, Environment Variables (<a href="libpq-envars.html" title="28.11.�Environment Variables">Section�28.11, &#8220;Environment Variables&#8221;</a>)</span>
149
 
</div>
150
 
</div></body>
151
 
</html>