vacuumdb

Name

vacuumdb  --  Clean and analyze a Postgres database Postgres データベースのゴミ掃除と解析を おこなう。

Synopsis

vacuumdb [ --analyze | -z ] [ --verbose | -v ] [ dbname ]
vacuumdb [ -h host ] [ -p
   port ]
    [ --table 'table [ (
   column [,...] ) ]' ]
    [ dbname ]
  

入力

vacuumdb accepts the following command line arguments:

vacuumdb は、以下のコマンドライン引数を 指定できます。

dbname

Specifies the name of the database to be cleaned or analyzed. dbname defaults to the value of the USER environment variable.

ゴミ掃除または解析の対象となるデータベース名を指定します。 dbname のデフォル トは 環境変数 USER の値です。

--analyze, -z

Calculate statistics on the database for use by the optimizer.

オプティマイザで使用される、データベースの統計情報を計算しま す。

--verbose, -v

Print detailed information during processing.

処理実行中に詳細な情報を表示します。

--table table [ (column [,...]) ], -t table [ (column [,...]) ]

Clean or analyze table only. Column names may be specified only in conjunction with the --analyze option.

table のみのゴ ミ掃除または解析を行ないます。カラム名は --analyze オプションがある場合にのみ設定で きます。

vacuumdb also accepts the following command line arguments for connection parameters:

vacuumdb は、以下の接続パラメータ用の コマンドライン引数を指定することもできます。

-h host

Specifies the hostname of the machine on which the postmaster is running. Defaults to using a local Unix domain socket rather than an IP connection..

postmaster が動作しているマシンのホ スト名を指定します。デフォルトでは IP 接続ではなくローカル Unix ドメインソケットを使用します。

-p port

「..」は「.」の間違いとして訳しています。 Specifies the Internet TCP/IP port or local Unix domain socket file extension on which the postmaster is listening for connections. The port number defaults to 5432, or the value of the PGPORT environment variable (if set).

postmaster が接続を監視するインター ネット TCP/IP ポート、もしくは、ローカル Unix ドメインソケット ファイルの拡張子を指定します。ポート番号のデフォルトは 5432、 あるいは、(もし設定されている場合は)環境変数 PGPORT の値です。

-u

Use password authentication. Prompts for username and password.

パスワード認証を使用します。 usernamepassword の入力を 待ちます。

出力

vacuumdb executes a VACUUM command on the specified database, so has not explicit external output.

vacuumdb は指定データベースに対して VACUUM コマンドを実行しますので、明確な外部への 出力はありません。

ERROR: Can't vacuum columns, only tables. You can 'vacuum analyze' columns. vacuumdb: database vacuum failed on dbname.

The non-analyze mode requires cleaning full tables or databases. Individual columns may be specified only when analyzing a specific table.

非解析モードでは、テーブルもしくはデータベース全体のゴミ掃除を 要求します。個別のカラムは指定テーブルの解析の時にのみ指定可能 です。

Connection to database 'template1' failed. connectDB() failed: Is the postmaster running and accepting connections at 'UNIX Socket' on port 'port'?

vacuumdb could not attach to the postmaster process on the specified host and port. If you see this message, ensure that the postmaster is running on the proper host and that you have specified the proper port. If your site uses an authentication system, ensure that you have obtained the required authentication credentials.

vacuumdb が指定ホストとポート上の postmaster プロセスに接続すること ができませんでした。このメッセージが表示された場合、 postmaster が正しいホストで動作し ていることと、正しいポートを指定したことを確認して下さい。も しサイトが認証システムを使っている場合は、必要な認証資格を受 けていることを確認して下さい。

Connection to database 'dbname' failed. FATAL 1: SetUserId: user 'username' is not in 'pg_shadow'

You do not have a valid entry in the relation pg_shadow and and will not be allowed to access Postgres. Contact your Postgres administrator.

pg_shadow リレーションに有効なエントリがな く、Postgres にアクセスすることが許 されていません。Postgres 管理者に連 絡して下さい。 「and

Note: and」は「and」の間違いとして訳しています。 vacuumdb internally executes a VACUUM SQL statement. If you have problems running vacuumdb, make sure you are able to run VACUUM on the database using, for example, psql.

vacuumdb はその内部で VACUUM SQL 文を実行します。 vacuumdb の実行に何か問題があった場合 は、例えば psql を使って、そのデータベ ースに対して VACUUM を実行できるかどうか確認し て下さい。

説明

vacuumdb is a utility for cleaning a Postgres database. vacuumdb will also generate internal statistics used by the Postgres query optimizer.

vacuumdb は、 Postgres データベースのゴミ掃除を行なう ユーティリティです。また、vacuumdbPostgres 問い合わせオプティマイザで使用 される内部的な統計情報も生成します。

注意

See VACUUM for more details.

より詳細については VACUUM を参照 して下さい。

使用法

To clean a database of the same name as the user:

ユーザと同じ名前のデータベースのゴミ掃除を行なう:

    % vacuumdb
   

To analyze a database named bigdb for the optimizer:

オプテイマイザのために、bigdb という名前のデータ ベースの解析を行なう:

    % vacuumdb --analyze bigdb
   

To analyze a single column bar in table foo in a database named xyzzy for the optimizer:

オブティマイザのために、xyzzy という名前のデータ ベースの foo テーブルのある 1 つの barというカラムに対して解析を行なう:

    % vacuumdb --analyze --verbose --table 'foo(bar)' xyzzy