バージョンごとのドキュメント一覧

vacuumlo

vacuumlo <refpurpose>remove orphaned large objects from a <productname>PostgreSQL</productname> database</refpurpose> PostgreSQLデータベースから孤児となったラージオブジェクトを削除する

概要

vacuumlo [option...] dbname...

説明

<title>Description</title>

<application>vacuumlo</application> is a simple utility program that will remove any <quote>orphaned</quote> large objects from a <productname>PostgreSQL</productname> database. An orphaned large object (LO) is considered to be any LO whose OID does not appear in any <type>oid</type> or <type>lo</type> data column of the database. vacuumloPostgreSQLデータベースから孤児になったラージオブジェクトをすべて削除する、単純なユーティリティです。 データベース内でoidまたはloデータ型列内にまったく現れないOIDを持つすべてのラージオブジェクト(LO)を孤児になったLOとみなします。

If you use this, you may also be interested in the <function>lo_manage</function> trigger in the <xref linkend="lo"/> module. <function>lo_manage</function> is useful to try to avoid creating orphaned LOs in the first place. これを使用する場合にはまた、loモジュール内のlo_manageトリガに興味を持つかもしれません。 lo_manageは初期段階で孤児になったLOの生成を防止しようと試みます。

All databases named on the command line are processed. コマンドラインで指名された全てのデータベースに対して処理が行われます。

オプション

<title>Options</title>

<application>vacuumlo</application> accepts the following command-line arguments: vacuumloは以下のコマンドライン引数を受け付けます。

-l limit
--limit=limit

Remove no more than <replaceable>limit</replaceable> large objects per transaction (default 1000). Since the server acquires a lock per LO removed, removing too many LOs in one transaction risks exceeding <xref linkend="guc-max-locks-per-transaction"/>. Set the limit to zero if you want all removals done in a single transaction. 1トランザクションに付き、limit個(デフォルトは1000)より多くのラージオブジェクトを削除しません。 サーバは削除されるLO毎に一つのロックを取得するため、多数のLOの削除を1トランザクションで行う場合、max_locks_per_transactionを超える恐れがあります。 もし1トランザクションで全ての削除を行いたい場合は、このlimit値を0に指定してください。

-n
--dry-run
<para>Don't remove anything, just show what would be done.</para>

ラージオブジェクトの削除を行わず、単に何が行われるはずかを示します。

-v
--verbose
<para>Write a lot of progress messages.</para>

多くの進行メッセージを出力します。

-V
--version

Print the <application>vacuumlo</application> version and exit. vacuumloのバージョンを表示し終了します。

-?
--help

Show help about <application>vacuumlo</application> command line arguments, and exit. vacuumloのコマンドライン引数に関するヘルプを表示し終了します。

<application>vacuumlo</application> also accepts the following command-line arguments for connection parameters: vacuumloは接続パラメータとして以下のコマンドライン引数も受け付けます。

-h host
--host=host
<para>Database server's host.</para>

データベースサーバのホスト名です。

-p port
--port=port
<para>Database server's port.</para>

データベースサーバのポート番号です。

-U username
--username=username
<para>User name to connect as.</para>

接続ユーザ名です。

-w
--no-password

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. パスワード入力のプロンプトを出しません。 もし、サーバがパスワード認証を必要としており、.pgpassファイルを用いる様な、プロンプト入力とは別の手段を通してパスワードを利用できない場合は、接続に失敗します。 このオプションは、バッチ処理やスクリプト処理の様なパスワードを入力するユーザがいないケースで役に立つかもしれません。

-W
--password

Force <application>vacuumlo</application> to prompt for a password before connecting to a database. vacuumloは強制的にデータベースに接続する前にパスワード入力を促します。

This option is never essential, since <application>vacuumlo</application> will automatically prompt for a password if the server demands password authentication. However, <application>vacuumlo</application> will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing <option>-W</option> to avoid the extra connection attempt. サーバがパスワード認証を要求する場合vacuumloは自動的にパスワード入力を促しますので、これが重要になることはありません。 しかし、vacuumloは、サーバにパスワードが必要かどうかを判断するための接続試行を無駄に行います。 こうした余計な接続試行を防ぐために-Wの入力が有意となる場合もあります。

環境

<title>Environment</title>
PGHOST
PGPORT
PGUSER

Default connection parameters. デフォルトの接続パラメータ。

This utility, like most other <productname>PostgreSQL</productname> utilities, also uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars"/>). このユーティリティは、他の多くPostgreSQLユーティリティと同様に、libpqがサポートする環境変数(34.15参照)も使います。

The environment variable <envar>PG_COLOR</envar> specifies whether to use color in diagnostic messages. Possible values are <literal>always</literal>, <literal>auto</literal> and <literal>never</literal>. 環境変数PG_COLORは診断メッセージで色を使うかどうかを指定します。 可能な値はalwaysautoneverです。

注釈

<title>Notes</title>

<application>vacuumlo</application> works by the following method: First, <application>vacuumlo</application> builds a temporary table which contains all of the OIDs of the large objects in the selected database. It then scans through all columns in the database that are of type <type>oid</type> or <type>lo</type>, and removes matching entries from the temporary table. (Note: Only types with these names are considered; in particular, domains over them are not considered.) The remaining entries in the temporary table identify orphaned LOs. These are removed. vacuumloは下記の手法で動作します。 まずvacuumloは選択されたデータベース内のラージオブジェクトのOIDをすべて含む一時テーブルを構築します。 そしてデータベース内でoid型またはlo型を型として持つ全列をスキャンし、一時テーブルから一致する項目を削除します。 (注意:これらの名前の型のみが対象となります。特に、これらの型を伴ったドメインなどはスキャン対象にはなりませんので注意が必要です。) 一時テーブルに残った項目を孤児LOと識別します。 これらが削除されます。

作者

<title>Author</title>

Peter Mount