-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp-clusterdb.html
More file actions
157 lines (154 loc) · 17.9 KB
/
Copy pathapp-clusterdb.html
File metadata and controls
157 lines (154 loc) · 17.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>clusterdb</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="prev" href="reference-client.html" title="PostgreSQLクライアントアプリケーション" /><link rel="next" href="app-createdb.html" title="createdb" /><meta name="viewport" content="width=device-width,initial-scale=1.0" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><td width="20%" align="left" colspan="2"></td><th width="60%" align="center"><a accesskey="h" href="index.html">PostgreSQL 9.6.5文書</a></th><td width="20%" align="right"><div class="actions"><a class="issue" href="https://github.com/pgsql-jp/jpug-doc/issues/new?title=version 9.6.5 app-clusterdb.html">誤訳等の報告</a></div></td></tr><tr><td width="10%" align="left" valign="top"><a accesskey="p" href="reference-client.html">前へ</a> </td><td width="10%" align="left" valign="top"><a accesskey="u" href="reference-client.html">上へ</a></td><td width="60%" align="center"><span class="application">clusterdb</span></td><td width="20%" align="right" valign="top"> <a accesskey="n" href="app-createdb.html">次へ</a></td></tr></table><hr /></div><div class="refentry" id="app-clusterdb"><div class="titlepage"></div><a id="idm45823021400448" class="indexterm"></a><div class="refnamediv"><h2>名前</h2><p>clusterdb<span class="original">
<refpurpose>cluster a <productname>PostgreSQL</productname> database</refpurpose>
</span> — <span class="productname">PostgreSQL</span>データベースをクラスタ化する</p></div><div class="refsynopsisdiv"><h2>概要</h2><div class="cmdsynopsis"><p id="idm45823021395664"><code class="command">clusterdb</code> [<em class="replaceable"><code>connection-option</code></em>...] [ <code class="option">--verbose</code> | <code class="option">-v</code> ] [ <code class="option">--table</code> | <code class="option">-t</code>
<em class="replaceable"><code>table</code></em>
]
... [<em class="replaceable"><code>dbname</code></em>]</p></div><div class="cmdsynopsis"><p id="idm45823021385552"><code class="command">clusterdb</code> [<em class="replaceable"><code>connection-option</code></em>...] [ <code class="option">--verbose</code> | <code class="option">-v</code> ] <code class="option">--all</code> | <code class="option">-a</code> </p></div></div><div class="refsect1" id="idm45823021378560"><h2>説明</h2><span class="original">
<title>Description</title>
</span><p><span class="original">
<application>clusterdb</application> is a utility for reclustering tables
in a <productname>PostgreSQL</productname> database. It finds tables
that have previously been clustered, and clusters them again on the same
index that was last used. Tables that have never been clustered are not
affected.
</span><span class="application">clusterdb</span>は、<span class="productname">PostgreSQL</span>データベース内のテーブルを再クラスタ化するユーティリティです。
既にクラスタ化されているテーブルを検索し、前回と同じインデックスを使用して再度クラスタ化します。
一度もクラスタ化されていないテーブルは処理されません。
</p><p><span class="original">
<application>clusterdb</application> is a wrapper around the SQL
command <xref linkend="SQL-CLUSTER">.
There is no effective difference between clustering databases via
this utility and via other methods for accessing the server.
</span><span class="application">clusterdb</span>は、SQLコマンド<a class="xref" href="sql-cluster.html" title="CLUSTER"><span class="refentrytitle">CLUSTER</span></a>のラッパです。
クラスタ化を行うのに、このユーティリティを使用しても、これ以外のサーバへのアクセス方法を使用しても、特別な違いはありません。
</p></div><div class="refsect1" id="idm45823021373184"><h2>オプション</h2><span class="original">
<title>Options</title>
</span><p><span class="original">
<application>clusterdb</application> accepts the following command-line arguments:
</span><span class="application">clusterdb</span>では、下記のコマンドライン引数を指定できます。
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-a</code><br /></span><span class="term"><code class="option">--all</code></span></dt><dd><p><span class="original">
Cluster all databases.
</span>全てのデータベースをクラスタ化します。
</p></dd><dt><span class="term"><code class="option">[<span class="optional">-d</span>] <em class="replaceable"><code>dbname</code></em></code><br /></span><span class="term"><code class="option">[<span class="optional">--dbname=</span>]<em class="replaceable"><code>dbname</code></em></code></span></dt><dd><p><span class="original">
Specifies the name of the database to be clustered.
If this is not specified and <option>-a</option> (or
<option>&#045;&#045;all</option>) is not used, the database name is read
from the environment variable <envar>PGDATABASE</envar>. If
that is not set, the user name specified for the connection is
used.
</span>クラスタ化するデータベースの名前を指定します。
データベース名が指定されておらず、<code class="option">-a</code>(または<code class="option">--all</code>)も使用されていない場合、データベース名は環境変数<code class="envar">PGDATABASE</code>から読み取られます。
この変数も設定されていない場合は、接続のために指定されたユーザ名が使用されます。
</p></dd><dt><span class="term"><code class="option">-e</code><br /></span><span class="term"><code class="option">--echo</code></span></dt><dd><p><span class="original">
Echo the commands that <application>clusterdb</application> generates
and sends to the server.
</span><span class="application">clusterdb</span>が生成し、サーバに送るコマンドをエコー表示します。
</p></dd><dt><span class="term"><code class="option">-q</code><br /></span><span class="term"><code class="option">--quiet</code></span></dt><dd><p><span class="original">
Do not display progress messages.
</span>進行メッセージを表示しません。
</p></dd><dt><span class="term"><code class="option">-t <em class="replaceable"><code>table</code></em></code><br /></span><span class="term"><code class="option">--table=<em class="replaceable"><code>table</code></em></code></span></dt><dd><p><span class="original">
Cluster <replaceable class="parameter">table</replaceable> only.
Multiple tables can be clustered by writing multiple
<option>-t</> switches.
</span><em class="replaceable"><code>table</code></em>のみをクラスタ化します。
複数の<code class="option">-t</code>スイッチを記述することで複数のテーブルをクラスタ化することができます。
</p></dd><dt><span class="term"><code class="option">-v</code><br /></span><span class="term"><code class="option">--verbose</code></span></dt><dd><p><span class="original">
Print detailed information during processing.
</span>処理の間、詳細な情報を出力します。
</p></dd><dt><span class="term"><code class="option">-V</code><br /></span><span class="term"><code class="option">--version</code></span></dt><dd><p><span class="original">
Print the <application>clusterdb</application> version and exit.
</span><span class="application">clusterdb</span>のバージョンを表示し、終了します。
</p></dd><dt><span class="term"><code class="option">-?</code><br /></span><span class="term"><code class="option">--help</code></span></dt><dd><p><span class="original">
Show help about <application>clusterdb</application> command line
arguments, and exit.
</span><span class="application">clusterdb</span>のコマンドライン引数の使用方法を表示し、終了します。
</p></dd></dl></div><p>
</p><p><span class="original">
<application>clusterdb</application> also accepts
the following command-line arguments for connection parameters:
</span><span class="application">clusterdb</span>は、さらに、下記のコマンドライン引数を接続パラメータとして受け付けます。
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-h <em class="replaceable"><code>host</code></em></code><br /></span><span class="term"><code class="option">--host=<em class="replaceable"><code>host</code></em></code></span></dt><dd><p><span class="original">
Specifies the host name of the machine on which the server is
running. If the value begins with a slash, it is used as the
directory for the Unix domain socket.
</span>サーバが稼働しているマシンのホスト名を指定します。
この値がスラッシュから始まる場合、Unixドメインソケット用のディレクトリとして使用されます。
</p></dd><dt><span class="term"><code class="option">-p <em class="replaceable"><code>port</code></em></code><br /></span><span class="term"><code class="option">--port=<em class="replaceable"><code>port</code></em></code></span></dt><dd><p><span class="original">
Specifies the TCP port or local Unix domain socket file
extension on which the server
is listening for connections.
</span>サーバが接続を監視するTCPポートもしくはUnixドメインソケットファイルの拡張子を指定します。
</p></dd><dt><span class="term"><code class="option">-U <em class="replaceable"><code>username</code></em></code><br /></span><span class="term"><code class="option">--username=<em class="replaceable"><code>username</code></em></code></span></dt><dd><p><span class="original">
User name to connect as.
</span>接続するためのユーザ名です。
</p></dd><dt><span class="term"><code class="option">-w</code><br /></span><span class="term"><code class="option">--no-password</code></span></dt><dd><p><span class="original">
Never issue a password prompt. If the server requires
password authentication and a password is not available by
other means such as a <filename>.pgpass</filename> file, the
connection attempt will fail. This option can be useful in
batch jobs and scripts where no user is present to enter a
password.
</span>パスワードの入力を促しません。
サーバがパスワード認証を必要とし、かつ、<code class="filename">.pgpass</code>ファイルなどの他の方法が利用できない場合、接続試行は失敗します。
バッチジョブやスクリプトなどパスワードを入力するユーザが存在しない場合にこのオプションは有用かもしれません。
</p></dd><dt><span class="term"><code class="option">-W</code><br /></span><span class="term"><code class="option">--password</code></span></dt><dd><p><span class="original">
Force <application>clusterdb</application> to prompt for a
password before connecting to a database.
</span>データベースに接続する前に、<span class="application">clusterdb</span>は強制的にパスワード入力を促します。
</p><p><span class="original">
This option is never essential, since
<application>clusterdb</application> will automatically prompt
for a password if the server demands password authentication.
However, <application>clusterdb</application> will waste a
connection attempt finding out that the server wants a password.
In some cases it is worth typing <option>-W</> to avoid the extra
connection attempt.
</span>サーバがパスワード認証を要求する場合<span class="application">clusterdb</span>は自動的にパスワード入力を促しますので、これが重要になることはありません。
しかし、<span class="application">clusterdb</span>は、サーバにパスワードが必要かどうかを判断するための接続試行を無駄に行います。
こうした余計な接続試行を防ぐために<code class="option">-W</code>の入力が有意となる場合もあります。
</p></dd><dt><span class="term"><code class="option">--maintenance-db=<em class="replaceable"><code>dbname</code></em></code></span></dt><dd><p><span class="original">
Specifies the name of the database to connect to discover what other
databases should be clustered. If not specified, the
<literal>postgres</literal> database will be used,
and if that does not exist, <literal>template1</literal> will be used.
</span>どのデータベースをクラスタ化しなければならないかを見つけ出すために接続するデータベースの名前を指定します。
指定されなければ<code class="literal">postgres</code>データベースが使用され、もし存在しなければ<code class="literal">template1</code>が使用されます。
</p></dd></dl></div><p>
</p></div><div class="refsect1" id="idm45823021328832"><h2>環境</h2><span class="original">
<title>Environment</title>
</span><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="envar">PGDATABASE</code><br /></span><span class="term"><code class="envar">PGHOST</code><br /></span><span class="term"><code class="envar">PGPORT</code><br /></span><span class="term"><code class="envar">PGUSER</code></span></dt><dd><p><span class="original">
Default connection parameters
</span> デフォルトの接続パラメータです。
</p></dd></dl></div><p><span class="original">
This utility, like most other <productname>PostgreSQL</> utilities,
also uses the environment variables supported by <application>libpq</>
(see <xref linkend="libpq-envars">).
</span>また、このユーティリティは、他のほとんどの<span class="productname">PostgreSQL</span>ユーティリティと同様、<span class="application">libpq</span>でサポートされる環境変数を使用します(<a class="xref" href="libpq-envars.html" title="32.14. 環境変数">32.14. 環境変数</a>を参照してください)。
</p></div><div class="refsect1" id="idm45823021322704"><h2>診断</h2><span class="original">
<title>Diagnostics</title>
</span><p><span class="original">
In case of difficulty, see <xref linkend="SQL-CLUSTER">
and <xref linkend="APP-PSQL"> for
discussions of potential problems and error messages.
The database server must be running at the
targeted host. Also, any default connection settings and environment
variables used by the <application>libpq</application> front-end
library will apply.
</span>問題が発生した場合、考えられる原因とエラーメッセージについては<a class="xref" href="sql-cluster.html" title="CLUSTER"><span class="refentrytitle">CLUSTER</span></a>と<a class="xref" href="app-psql.html" title="psql"><span class="refentrytitle"><span class="application">psql</span></span></a>を参照してください。
データベースサーバは対象ホスト上で稼働していなければなりません。
また、<span class="application">libpq</span>フロントエンドライブラリの、あらゆるデフォルトの設定や環境変数が適用されます。
</p></div><div class="refsect1" id="idm45823021318960"><h2>例</h2><span class="original">
<title>Examples</title>
</span><p><span class="original">
To cluster the database <literal>test</literal>:
</span>データベース<code class="literal">test</code>をクラスタ化します。
</p><pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>clusterdb test</code></strong></pre><p>
</p><p><span class="original">
To cluster a single table
<literal>foo</literal> in a database named
<literal>xyzzy</literal>:
</span><code class="literal">xyzzy</code>というデータベース内のテーブルの1つ<code class="literal">foo</code>をクラスタ化します。
</p><pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>clusterdb --table foo xyzzy</code></strong></pre></div><div class="refsect1" id="idm45823021312192"><h2>関連項目</h2><span class="original">
<title>See Also</title>
</span><span class="simplelist"><a class="xref" href="sql-cluster.html" title="CLUSTER"><span class="refentrytitle">CLUSTER</span></a></span></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="reference-client.html">前へ</a> </td><td width="20%" align="center"><a accesskey="u" href="reference-client.html">上へ</a></td><td width="40%" align="right"> <a accesskey="n" href="app-createdb.html">次へ</a></td></tr><tr><td width="40%" align="left" valign="top">PostgreSQLクライアントアプリケーション </td><td width="20%" align="center"><a accesskey="h" href="index.html">ホーム</a></td><td width="40%" align="right" valign="top"> <span class="application">createdb</span></td></tr></table></div></body></html>