pg_reorg version 1.1.0.
- Add wait-timeout option and use SET statement_timeout instead of NOWAIT. This can avoid infinite NOWAIT loops to reorganize heavily accessed tables. - Support native build with MSVC on Windows.
This commit is contained in:
@ -17,11 +17,21 @@
|
||||
<h1>pg_reorg ホームページへようこそ</h1>
|
||||
<hr />
|
||||
</center>
|
||||
|
||||
<p>このプロジェクトでは <strong>pg_reorg</strong> と <strong>pg_batch</strong> の2つのツールを頒布しています。</p>
|
||||
|
||||
<p>
|
||||
pg_reorg は PostgreSQL のテーブルを再編成するシェルコマンドです。
|
||||
<strong>pg_reorg</strong> は PostgreSQL のテーブルを再編成するシェルコマンドです。
|
||||
共有ロックや排他ロックを取得しないため、再編成中であっても行の参照や更新を行うことができます。
|
||||
このモジュールは CLUSTER や VACUUM FULL コマンドのより良い代替になります。
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>pg_batch</strong> は PostgreSQL のためのSQLジョブ実行プログラムです。
|
||||
ジョブ一覧生成するスクリプトを SQL として外部から与え、その出力 SQL をジョブとしてシリアルまたはパラレルに実行します。
|
||||
VACUUM を行うスクリプトが付属しており、"より良い vacuumdb" として利用できます。
|
||||
</p>
|
||||
|
||||
<p>この pg_reorg プロジェクトは <a href="http://www.postgresql.org">PostgreSQL</a> コミュニティによる <a href="http://pgfoundry.org">pgFoundry</a> の中の<a href="http://pgfoundry.org/projects/reorg">プロジェクト</a>です。</p>
|
||||
<ul>
|
||||
<li><a href="http://pgfoundry.org/frs/?group_id=1000411">ダウンロード</a> : ソースコードのほか、Windows 用バイナリもダウンロードできます。</li>
|
||||
@ -34,9 +44,11 @@ pg_reorg は PostgreSQL のテーブルを再編成するシェルコマンド
|
||||
<hr />
|
||||
|
||||
<h2>ドキュメント</h2>
|
||||
<p>
|
||||
<a href="pg_reorg-ja.html">ドキュメントはこちら</a>。
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="pg_reorg-ja.html">pg_reorg 1.1.0 ドキュメント</a></li>
|
||||
<li><a href="pg_batch-ja.html">pg_batch 1.2.0 ドキュメント</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>実行時間</h2>
|
||||
<p>
|
||||
|
@ -17,10 +17,22 @@
|
||||
<h1>Welcome to the pg_reorg Project Home Page</h1>
|
||||
<hr />
|
||||
</center>
|
||||
|
||||
<p>
|
||||
pg_reorg can re-organize tables on a postgres database without any locks so that you can retrieve or update rows in tables being reorganized.
|
||||
This project provides two tools for PostgreSQL; <strong>pg_reorg</strong> and <strong>pg_batch</strong>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>pg_reorg</strong> can re-organize tables on a postgres database without any locks so that you can retrieve or update rows in tables being reorganized.
|
||||
The module is developed to be a better alternative of CLUSTER and VACUUM FULL.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>pg_batch</strong> is a SQL job executor program for PostgreSQL.
|
||||
It generates job list from an external SQL script file, and execute the jobs in serial or parallel.
|
||||
It can be used as "a better vacuumdb" with the attached script to run VACUUM.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The pg_reorg project is a <a href="http://www.postgresql.org">PostgreSQL</a> Community project that is a part of the <a href="http://pgfoundry.org">pgFoundry</a>.
|
||||
</p>
|
||||
@ -34,9 +46,11 @@ where you can find <a href="http://pgfoundry.org/frs/?group_id=1000411">download
|
||||
<hr />
|
||||
|
||||
<h2>Documentation</h2>
|
||||
<p>
|
||||
<a href="pg_reorg.html">Documentations here</a>.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="pg_reorg.html">pg_reorg 1.1.0 documentation</a></li>
|
||||
<li><a href="pg_batch-ja.html">pg_batch 1.2.0 documentation</a> (ja)</li>
|
||||
</ul>
|
||||
|
||||
<h2>Execution time</h2>
|
||||
<p>
|
||||
|
@ -8,7 +8,12 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 id="pg_reorg">pg_reorg</h1>
|
||||
<h1 id="pg_reorg">pg_reorg 1.1.0</h1>
|
||||
<div class="navigation">
|
||||
<a href="index-ja.html">Top</a> >
|
||||
<a href="pg_reorg-ja.html">pg_reorg</a>
|
||||
<div>
|
||||
<hr />
|
||||
|
||||
<div class="index">
|
||||
<ol>
|
||||
@ -31,28 +36,34 @@ pg_reorg -- PostgreSQLデータベース内のテーブルに対して、参照/
|
||||
|
||||
<h2 id="synopsis">概要</h2>
|
||||
<p>
|
||||
pg_reorg [connection-options...] [message-options...] [order-options...] [target-options...]
|
||||
pg_reorg [OPTIONS]
|
||||
</p>
|
||||
<p>指定できるオプションには4つのカテゴリがあります。
|
||||
|
||||
<p>オプション OPTIONS には以下を指定できます。
|
||||
詳細は<a href="#options">オプション</a>を参照してください。</p>
|
||||
<dl>
|
||||
<dt>connection-options : 接続パラメータ</dt>
|
||||
<dd>-h [--host] host</dd>
|
||||
<dd>-p [--port] port</dd>
|
||||
<dd>-U [--username] username</dd>
|
||||
<dd>-W [--password]</dd>
|
||||
<dt>message-options : 出力メッセージ</dt>
|
||||
<dd>-q [--quiet]</dd>
|
||||
<dd>-v [--verbose]</dd>
|
||||
<dt>order-options : 並び替えの基準</dt>
|
||||
<dd>-o [--order-by] columns [,...]</dd>
|
||||
<dd>-n [--no-order]</dd>
|
||||
<dt>target-options : 処理対象</dt>
|
||||
<dd>-a [--all]</dd>
|
||||
<dd>-d [--dbname] dbname</dd>
|
||||
<dd>-t [--table] table</dd>
|
||||
<dd>-Z [--no-analyze]</dd>
|
||||
</dl>
|
||||
<ul>
|
||||
<li>固有オプション<ul>
|
||||
<li>-o [--order-by] columns [,...]</li>
|
||||
<li>-n [--no-order]</li>
|
||||
<li>-t [--table] table</li>
|
||||
<li>-T [--wait-timeout] seconds</li>
|
||||
<li>-Z [--no-analyze]</li>
|
||||
</ul></li>
|
||||
<li>接続オプション<ul>
|
||||
<li>-a, --all : 全てのデータベースに対して実行します</li>
|
||||
<li>-d, --dbname=DBNAME : 接続するデータベース</li>
|
||||
<li>-h, --host=HOSTNAME : データベースサーバホスト、またはソケットディレクトリ</li>
|
||||
<li>-p, --port=PORT : データベースサーバのポート</li>
|
||||
<li>-U, --username=USERNAME : このユーザとして接続します</li>
|
||||
<li>-W, --password : パスワード入力を強制します</li>
|
||||
</ul></li>
|
||||
<li>一般オプション<ul>
|
||||
<li>-e, --echo : サーバに送信するSQLを表示します</li>
|
||||
<li>-E, --elevel=LEVEL : ログ出力レベルを設定します</li>
|
||||
<li>--help : ヘルプを表示し、終了します</li>
|
||||
<li>--version : バージョン情報を出力し、終了します</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="description">説明</h2>
|
||||
<p>pg_reorg は、PostgreSQLデータベース内のテーブルを再編成(行の並び替え)するユーティリティです。
|
||||
@ -77,47 +88,11 @@ pg_reorg [connection-options...] [message-options...] [order-options...] [tar
|
||||
</p>
|
||||
|
||||
<h2 id="options">オプション</h2>
|
||||
<p>pg_reorg では、下記の4種類のコマンドライン引数を指定できます。</p>
|
||||
<p>pg_reorg では、下記のコマンドライン引数を指定できます。</p>
|
||||
<dl>
|
||||
|
||||
<h3>connection-options</h3>
|
||||
<p>PostgreSQLに接続するためのパラメータです。</p>
|
||||
|
||||
<dl>
|
||||
<dt>-h host<br />
|
||||
--host host</dt>
|
||||
<dd>サーバが稼働しているマシンのホスト名を指定します。ホスト名がスラッシュから始まる場合、Unixドメインソケット用のディレクトリとして使用されます。</dd>
|
||||
|
||||
<dt>-p port<br />
|
||||
--port port</dt>
|
||||
<dd>サーバが接続を監視するTCPポートもしくはUnixドメインソケットファイルの拡張子を指定します。</dd>
|
||||
|
||||
<dt>-U username<br />
|
||||
--username username</dt>
|
||||
<dd>接続するユーザ名を指定します。</dd>
|
||||
|
||||
<dt>-W<br />--password</dt>
|
||||
<dd>データベースに接続する前に、pg_reorg は強制的にパスワード入力を促します。</dd>
|
||||
<dd>サーバがパスワード認証を要求する場合 pg_reorg は自動的にパスワード入力を促しますので、これが重要になることはありません。
|
||||
しかし、pg_reorg は、サーバにパスワードが必要かどうかを判断するための接続試行を無駄に行います。
|
||||
こうした余計な接続試行を防ぐために-Wの入力が有意となる場合もあります。</dd>
|
||||
</dl>
|
||||
|
||||
<h3>message-options</h3>
|
||||
<p>
|
||||
pg_reorg を実行した際に任意のメッセージを出力するためのパラメータです。
|
||||
--quietと他の2つのオプションを同時に指定した場合は、--quietのオプションは無視されます。
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
<dt>-q<br />--quiet</dt>
|
||||
<dd>進行メッセージを表示しません。</dd>
|
||||
<dt>-v<br />--verbose</dt>
|
||||
<dd>処理中に詳細な情報を表示します。</dd>
|
||||
</dl>
|
||||
|
||||
<h3>order-options</h3>
|
||||
<p>pg_reorg を実行する際の並び替えの基準を指定するパラメータです。
|
||||
<h3>固有オプション</h3>
|
||||
<p>pg_reorg を実行する対象と並び替えの基準を指定するパラメータです。
|
||||
何も指定されていない場合は、cluster index順にオンライン CLUSTER を行います。
|
||||
この2つを同時に指定することはできません。
|
||||
</p>
|
||||
@ -131,9 +106,34 @@ pg_reorg を実行した際に任意のメッセージを出力するための
|
||||
<dd>指定したカラムをキーにオンライン CLUSTER を行います。</dd>
|
||||
</dl>
|
||||
|
||||
<h3>target-options</h3>
|
||||
<dt>
|
||||
-t table<br />
|
||||
--table=table
|
||||
</dt>
|
||||
<dd>オンライン CLUSTER 、または、オンライン VACUUM FULL を行うテーブルを指定します。
|
||||
このオプションが指定されていない場合は、対象となったデータベースに存在する全ての対象テーブルに対して処理を行います。
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
-T seconds<br />
|
||||
--wait-timeout=seconds
|
||||
</dt>
|
||||
<dd>
|
||||
再編成完了直前に一瞬だけ排他ロックを取得しますが、この排他ロックが取得できるまで待機する秒数を指定します。
|
||||
この秒数が経過してもロックが取得できない場合には、対象のテーブルにアクセスしている他の全てのクエリを取り消します。
|
||||
また、サーバのバージョンが 8.4 またはそれ以降の場合には、指定した秒数の2倍経過してもロックを取得できない場合には、強制的に切断します。
|
||||
デフォルトは60秒です。
|
||||
</dd>
|
||||
|
||||
<dt>-Z<br />--no-analyze</dt>
|
||||
<dd>再編成後に ANALYZE を行いません。
|
||||
このオプションが指定されていない場合は、再編成後に ANALYZE します。</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
<h3>接続オプション</h3>
|
||||
<p>
|
||||
pg_reorg を実行する対象を指定するパラメータです。
|
||||
PostgreSQLに接続するためのパラメータです。
|
||||
--allと--dbnameまたは--tableを同時に指定することはできません。
|
||||
</p>
|
||||
|
||||
@ -142,26 +142,46 @@ pg_reorg を実行する対象を指定するパラメータです。
|
||||
<dd>対象となる全てのデータベースに対してオンライン CLUSTER、または、オンラインVACUUM FULLを行います。</dd>
|
||||
|
||||
<dt>
|
||||
-d dbname<br />
|
||||
--dbname dbname
|
||||
-d DBNAME<br />
|
||||
--dbname=DBNAME
|
||||
</dt>
|
||||
<dd>オンライン CLUSTER、または、オンライン VACUUM FULL を行うデータベース名を指定します。
|
||||
データベース名が指定されておらず、-a(または--all)も指定されていない場合、
|
||||
データベース名はPGDATABASE環境変数から読み取られます。この変数も設定されていない場合は、接続時に指定したユーザ名が使用されます。
|
||||
</dd>
|
||||
データベース名はPGDATABASE環境変数から読み取られます。
|
||||
この変数も設定されていない場合は、接続時に指定したユーザ名が使用されます。</dd>
|
||||
|
||||
<dt>
|
||||
-t table<br />
|
||||
--table table
|
||||
</dt>
|
||||
<dd>オンライン CLUSTER 、または、オンライン VACUUM FULL を行うテーブルを指定します。
|
||||
このオプションが指定されていない場合は、対象となったデータベースに存在する全ての対象テーブルに対して処理を行います。
|
||||
</dd>
|
||||
<dt>-h HOSTNAME<br />
|
||||
--host=HOSTNAME</dt>
|
||||
<dd>サーバが稼働しているマシンのホスト名を指定します。ホスト名がスラッシュから始まる場合、Unixドメインソケット用のディレクトリとして使用されます。</dd>
|
||||
|
||||
<dt>-Z<br />--no-analyze</dt>
|
||||
<dd>再編成後に ANALYZE を行いません。
|
||||
このオプションが指定されていない場合は、再編成後に ANALYZE します。</dd>
|
||||
<dt>-p PORT<br />
|
||||
--port=PORT</dt>
|
||||
<dd>サーバが接続を監視するTCPポートもしくはUnixドメインソケットファイルの拡張子を指定します。</dd>
|
||||
|
||||
<dt>-U USERNAME<br />
|
||||
--username=USERNAME</dt>
|
||||
<dd>接続するユーザ名を指定します。</dd>
|
||||
|
||||
<dt>-W<br />
|
||||
--password</dt>
|
||||
<dd>データベースに接続する前に、強制的にパスワード入力を促します。
|
||||
サーバがパスワード認証を要求する場合 自動的にパスワード入力を促しますので、これが重要になることはありません。
|
||||
しかし、サーバにパスワードが必要かどうかを判断するための接続試行を無駄に行います。
|
||||
こうした余計な接続試行を防ぐために -W の入力が有意となる場合もあります。</dd>
|
||||
</dl>
|
||||
|
||||
<h3>一般オプション</h3>
|
||||
<dl>
|
||||
<dt>-e<br />--echo</dt>
|
||||
<dd>サーバに送信するSQLを表示します。</dd>
|
||||
<dt>-E<br />--elevel</dt>
|
||||
<dd>ログ出力レベルを設定します。
|
||||
DEBUG, INFO, NOTICE, WARNING, ERROR, LOG, FATAL, PANIC から選択します。
|
||||
デフォルトは INFO です。</dd>
|
||||
<dt>--help</dt>
|
||||
<dd>使用方法について表示します。</dd>
|
||||
<dt>--version</dt>
|
||||
<dd>バージョン情報を表示します。</dd>
|
||||
</dl>
|
||||
|
||||
<h2 id="environment">環境変数</h2>
|
||||
@ -268,9 +288,12 @@ pg_reorg の実行中には、VACUUM と ANALYZE <STRONG>以外</STRONG> のDDL
|
||||
|
||||
<h2 id="requirement">動作環境</h2>
|
||||
<dl>
|
||||
<dt>PostgreSQLバージョン</dt><dd>PostgreSQL 8.3</dd>
|
||||
<dt>OS</dt><dd>RHEL 5.2, Windows XP SP3</dd>
|
||||
<dt>ディスク容量</dt><dd>処理対象のテーブル、インデックスサイズの2倍以上のディスク空き容量</dd>
|
||||
<dt>PostgreSQLバージョン</dt>
|
||||
<dd>PostgreSQL 8.3, 8.4, 9.0</dd>
|
||||
<dt>OS</dt>
|
||||
<dd>RHEL 5.2, Windows XP SP3</dd>
|
||||
<dt>ディスク容量</dt>
|
||||
<dd>処理対象のテーブル、インデックスサイズの2倍以上のディスク空き容量 (対象が1GBならば、さらに追加で2GB)</dd>
|
||||
</dl>
|
||||
|
||||
<h2 id="seealso">関連項目</h2>
|
||||
@ -278,6 +301,10 @@ pg_reorg の実行中には、VACUUM と ANALYZE <STRONG>以外</STRONG> のDDL
|
||||
<a href="http://www.postgresql.jp/document/current/html/app-vacuumdb.html">vacuumdb</a>
|
||||
|
||||
<hr />
|
||||
<div class="navigation">
|
||||
<a href="index-ja.html">Top</a> >
|
||||
<a href="pg_reorg-ja.html">pg_reorg</a>
|
||||
<div>
|
||||
<p class="footer">Copyright (c) 2008-2010, NIPPON TELEGRAPH AND TELEPHONE CORPORATION</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -8,7 +8,12 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 id="pg_reorg">pg_reorg</h1>
|
||||
<h1 id="pg_reorg">pg_reorg 1.1.0</h1>
|
||||
<div class="navigation">
|
||||
<a href="index.html">Top</a> >
|
||||
<a href="pg_reorg.html">pg_reorg</a>
|
||||
<div>
|
||||
<hr />
|
||||
|
||||
<div class="index">
|
||||
<ol>
|
||||
@ -31,28 +36,34 @@ pg_reorg -- Reorganize tables in PostgreSQL databases without any locks.
|
||||
|
||||
<h2 id="synopsis">Synopsis</h2>
|
||||
<p>
|
||||
pg_reorg [connection-options...] [message-options...] [order-options...] [target-options...]
|
||||
pg_reorg [OPTIONS]
|
||||
</p>
|
||||
<p>There 4 option categories.
|
||||
See also <a href="#options">options</a> for details.</p>
|
||||
<dl>
|
||||
<dt>connection-options</dt>
|
||||
<dd>-h [--host] host</dd>
|
||||
<dd>-p [--port] port</dd>
|
||||
<dd>-U [--username] username</dd>
|
||||
<dd>-W [--password]</dd>
|
||||
<dt>message-options</dt>
|
||||
<dd>-q [--quiet]</dd>
|
||||
<dd>-v [--verbose]</dd>
|
||||
<dt>order-options</dt>
|
||||
<dd>-o [--order-by] columns [,...]</dd>
|
||||
<dd>-n [--no-order]</dd>
|
||||
<dt>target-options</dt>
|
||||
<dd>-a [--all]</dd>
|
||||
<dd>-d [--dbname] dbname</dd>
|
||||
<dd>-t [--table] table</dd>
|
||||
<dd>-Z [--no-analyze]</dd>
|
||||
</dl>
|
||||
|
||||
<p>The following options can be specified in OPTIONS.
|
||||
See also "<a href="#options">Options</a>" for details.</p>
|
||||
<ul>
|
||||
<li>Reorg Options<ul>
|
||||
<li>-o [--order-by] columns [,...]</li>
|
||||
<li>-n [--no-order]</li>
|
||||
<li>-t [--table] table</li>
|
||||
<li>-T [--wait-timeout] seconds</li>
|
||||
<li>-Z [--no-analyze]</li>
|
||||
</ul></li>
|
||||
<li>Connection Options<ul>
|
||||
<li>-a, --all : reorganize all databases</li>
|
||||
<li>-d, --dbname=DBNAME : database to connect</li>
|
||||
<li>-h, --host=HOSTNAME : database server host or socket directory</li>
|
||||
<li>-p, --port=PORT : database server port</li>
|
||||
<li>-U, --username=USERNAME : user name to connect as</li>
|
||||
<li>-W, --password : force password prompt</li>
|
||||
</ul></li>
|
||||
<li>Generic Options<ul>
|
||||
<li>-e, --echo : echo queries</li>
|
||||
<li>-E, --elevel=LEVEL : set output message level</li>
|
||||
<li>--help : show the help, then exit</li>
|
||||
<li>--version : output version information, then exit</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="description">Description</h2>
|
||||
<p>pg_reorg is an utility program to reorganize tables in PostgreSQL databases.
|
||||
@ -77,15 +88,68 @@ You can choose one of the following methods to reorganize.</p>
|
||||
</p>
|
||||
|
||||
<h2 id="options">Options</h2>
|
||||
<p>pg_reorg has command line options in 4 categolies.</p>
|
||||
<div>
|
||||
<p>pg_reorg has the following command line options:</p>
|
||||
<dl>
|
||||
|
||||
<h3>connection-options</h3>
|
||||
<p>Parameters to connect PostgreSQL.</p>
|
||||
<h3>Reorg Options</h3>
|
||||
<p>Options to order rows.
|
||||
If not specified, pg_reorg do online CLUSTER using cluster indexes.
|
||||
Only one option can be specified.
|
||||
|
||||
Options to specify target tables or databases.
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<dl>
|
||||
<dt>-n<br />--no-order</dt>
|
||||
<dd>Do online VACUUM FULL.</dd>
|
||||
|
||||
<dt>-o columns [,...]<br />
|
||||
--order-by=columns [,...]</dt>
|
||||
<dd>Do online CLUSTER ordered by specified columns.</dd>
|
||||
|
||||
<dt>
|
||||
-t table<br />
|
||||
--table=table
|
||||
</dt>
|
||||
<dd>Reorganize table only. If you don't specify this option, all tables in specified databases are reorganized.</dd>
|
||||
|
||||
<dt>-Z<br />--no-analyze</dt>
|
||||
<dd>Do ANALYZE after reorganization. If you don't specify this option, ANALYZE is performed automatically after reorg.</dd>
|
||||
|
||||
<dt>
|
||||
-T seconds<br />
|
||||
--wait-timeout=seconds
|
||||
</dt>
|
||||
<dd>
|
||||
pg_reorg needs to take an exclusive lock at the end of the reorganization.
|
||||
This setting controls how long it wait for acquiring the lock in seconds.
|
||||
If the lock cannot be taken even after the duration, pg_reorg forces to cancel conflicted queries.
|
||||
Also, if the server version is 8.4 or newer, pg_reorg forces to disconnect conflicted backends after twice time passed.
|
||||
The default is 60 seconds.
|
||||
</dd>
|
||||
|
||||
<dt>-Z<br />--no-analyze</dt>
|
||||
<dd>Disable ANALYZE after the reorganization.
|
||||
If not specified, run ANALYZE after the reorganization.</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
<h3>Connection Options</h3>
|
||||
<p>
|
||||
Options to connect to servers.
|
||||
You cannot use --all and --dbname or --table together.
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
<dt>-a<br />--all</dt>
|
||||
<dd>Reorganize all databases.</dd>
|
||||
|
||||
<dt>
|
||||
-d dbname<br />
|
||||
--dbname dbname
|
||||
</dt>
|
||||
<dd>Specifies the name of the database to be reorganized. If this is not specified and -a (or --all) is not used, the database name is read from the environment variable PGDATABASE. If that is not set, the user name specified for the connection is used. </dd>
|
||||
|
||||
<dt>-h host<br />
|
||||
--host host</dt>
|
||||
<dd>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. </dd>
|
||||
@ -103,58 +167,17 @@ You can choose one of the following methods to reorganize.</p>
|
||||
<dd>This option is never essential, since pg_reorg will automatically prompt for a password if the server demands password authentication. However, vacuumdb will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. </dd>
|
||||
</dl>
|
||||
|
||||
<h3>message-options</h3>
|
||||
<p>Specifies message output by pg_reorg.
|
||||
--quiet is ignored if some of the other options are specified.</p>
|
||||
|
||||
<h3>Generic Options</h3>
|
||||
<dl>
|
||||
<dt>-q<br />--quiet</dt>
|
||||
<dd>Do not display progress messages. </dd>
|
||||
<dt>-v<br />--verbose</dt>
|
||||
<dd>Print detailed information during processing.</dd>
|
||||
</dl>
|
||||
|
||||
<h3>order-options</h3>
|
||||
<p>Options to order rows.
|
||||
If not specified, pg_reorg do online CLUSTER using cluster indexes.
|
||||
Only one option can be specified.
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
<dt>-n<br />--no-order</dt>
|
||||
<dd>Do online VACUUM FULL.</dd>
|
||||
|
||||
<dt>-o columns [,...]<br />
|
||||
--order-by columns [,...]</dt>
|
||||
<dd>Do online CLUSTER ordered by specified columns.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>target-options</h3>
|
||||
<p>
|
||||
Options to specify target tables or databases.
|
||||
You cannot use --all and --dbname or --table together.
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
<dt>-a<br />--all</dt>
|
||||
<dd>Reorganize all databases.</dd>
|
||||
|
||||
<dt>
|
||||
-d dbname<br />
|
||||
--dbname dbname
|
||||
</dt>
|
||||
<dd>Specifies the name of the database to be reorganized. If this is not specified and -a (or --all) is not used, the database name is read from the environment variable PGDATABASE. If that is not set, the user name specified for the connection is used. </dd>
|
||||
|
||||
<dt>
|
||||
-t table<br />
|
||||
--table table
|
||||
</dt>
|
||||
<dd>Reorganize table only. If you don't specify this option, all tables in specified databases are reorganized.</dd>
|
||||
|
||||
<dt>-Z<br />--no-analyze</dt>
|
||||
<dd>Do ANALYZE after reorganization. If you don't specify this option, ANALYZE is performed automatically after reorg.</dd>
|
||||
|
||||
<dt>-e<br />--echo</dt>
|
||||
<dd>Echo commands sent to server.</dd>
|
||||
<dt>-E<br />--elevel</dt>
|
||||
<dd>Choose the output message level from DEBUG, INFO, NOTICE, WARNING, ERROR, LOG, FATAL, and PANIC.
|
||||
The default is INFO.</dd>
|
||||
<dt>--help</dt>
|
||||
<dd>Show usage of the program.</dd>
|
||||
<dt>--version</dt>
|
||||
<dd>Show the version number of the program.</dd>
|
||||
</dl>
|
||||
|
||||
<h2 id="environment">Environment</h2>
|
||||
@ -253,9 +276,10 @@ Then, it updates system catalog directly to swap the work table and the original
|
||||
|
||||
<h2 id="requirement">Requirements</h2>
|
||||
<dl>
|
||||
<dt>PostgreSQL version</dt><dd>PostgreSQL 8.3</dd>
|
||||
<dt>PostgreSQL version</dt>
|
||||
<dd>PostgreSQL 8.3, 8.4, 9.0</dd>
|
||||
<dt>OS</dt><dd>RHEL 5.2, Windows XP SP3</dd>
|
||||
<dt>Disks</dt><dd>Requires amount of disks twice larger than target table and indexes.</dd>
|
||||
<dt>Disks</dt><dd>Requires amount of disks twice larger than target table and indexes. (If the total size of targets are 1GB, additional 2GB of disks are required.)</dd>
|
||||
</dl>
|
||||
|
||||
<h2 id="seealso">See Also</h2>
|
||||
@ -263,6 +287,10 @@ Then, it updates system catalog directly to swap the work table and the original
|
||||
<a href="http://developer.postgresql.org/pgdocs/postgres/app-vacuumdb.html">vacuumdb</a>
|
||||
|
||||
<hr />
|
||||
<div class="navigation">
|
||||
<a href="index.html">Top</a> >
|
||||
<a href="pg_reorg.html">pg_reorg</a>
|
||||
<div>
|
||||
<p class="footer">Copyright (c) 2008-2010, NIPPON TELEGRAPH AND TELEPHONE CORPORATION</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -79,3 +79,7 @@ p.footer {
|
||||
text-align: right;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
span.param {
|
||||
color: #0000cd;
|
||||
}
|
||||
|
Reference in New Issue
Block a user