These parameters control vacuuming behavior. For more information on the purpose and responsibilities of vacuum, see <xref linkend="routine-vacuuming"/>. これらのパラメータは、バキューム処理の挙動を制御します。 バキュームの目的と責任の詳細は24.1を参照してください。
These settings control the behavior of the <firstterm>autovacuum</firstterm> feature. Refer to <xref linkend="autovacuum"/> for more information. Note that many of these settings can be overridden on a per-table basis; see <xref linkend="sql-createtable-storage-parameters"/>. 以下に示す設定は自動バキューム機能の動作を制御します。 詳細は24.1.6を参照してください。 これらの設定の多くは、テーブル単位で変更できることに注意してください。 格納パラメータを参照してください。
autovacuum (boolean)
#
Controls whether the server should run the
autovacuum launcher daemon. This is on by default; however,
<xref linkend="guc-track-counts"/> must also be enabled for
autovacuum to work.
This parameter can only be set in the <filename>postgresql.conf</filename>
file or on the server command line; however, autovacuuming can be
disabled for individual tables by changing table storage parameters.
サーバが自動バキュームランチャデーモンを実行すべきかどうかを管理します。
デフォルトでは有効です。
しかし自動バキュームを作動させるためにはtrack_countsも有効でなければなりません。
このパラメータは、postgresql.confファイルか、サーバのコマンドラインでのみ設定可能です。
ただし、テーブル格納パラメータを変更することにより、自動バキュームは個々のテーブルに対して無効にできます。
Note that even when this parameter is disabled, the system will launch autovacuum processes if necessary to prevent transaction ID wraparound. See <xref linkend="vacuum-for-wraparound"/> for more information. このパラメータが無効であったとしてもシステムは、トランザクションIDの周回を防止する必要があれば、自動バキュームプロセスを起動することに注意してください。 詳細は24.1.5を参照してください。
autovacuum_worker_slots (integer)
#Specifies the number of backend slots to reserve for autovacuum worker processes. The default is typically 16 slots, but might be less if your kernel settings will not support it (as determined during initdb). This parameter can only be set at server start. 自動バキュームワーカープロセス用に予約するバックエンドのスロット数を指定します。 デフォルトは通常16スロットですが、カーネル設定でサポートされない場合(initdb中に判定します)、それより少なくなる可能性があります。 このパラメータはサーバ起動時のみ設定可能です。
When changing this value, consider also adjusting <xref linkend="guc-autovacuum-max-workers"/>. この値を変更する場合は、autovacuum_max_workersを調整することも考慮してください。
autovacuum_max_workers (integer)
#
Specifies the maximum number of autovacuum processes (other than the
autovacuum launcher) that may be running at any one time. The default
is <literal>3</literal>. This parameter can only be set in the
<filename>postgresql.conf</filename> file or on the server command line.
同時に実行することができる自動バキュームプロセス(自動バキュームランチャ以外)の最大数を指定します。
デフォルトは3です。
このパラメータは、postgresql.confファイルか、サーバのコマンドラインでのみ設定可能です。
Note that a setting for this value which is higher than <xref linkend="guc-autovacuum-worker-slots"/> will have no effect, since autovacuum workers are taken from the pool of slots established by that setting. autovacuum_worker_slotsよりも大きい値を設定しても効果はありません。 これは、自動バキュームワーカーがこの設定によって確立されたスロットのプールから取得されるためです。
autovacuum_naptime (integer)
#
Specifies the minimum delay between autovacuum runs on any given
database. In each round the daemon examines the
database and issues <command>VACUUM</command> and <command>ANALYZE</command> commands
as needed for tables in that database.
If this value is specified without units, it is taken as seconds.
The default is one minute (<literal>1min</literal>).
This parameter can only be set in the <filename>postgresql.conf</filename>
file or on the server command line.
あるデータベースについて実行される自動バキュームデーモンの最小遅延を指定します。
それぞれの周期で、デーモンはそのデータベースを試験し、そしてそのデータベース内のテーブルで必要性が認められると、VACUUMおよびANALYZEコマンドを発行します。
この値が単位なしで指定された場合は、秒単位であるとみなします。
デフォルトは1分(1min)です。
このパラメータは、postgresql.confファイルか、サーバのコマンドラインでのみ設定可能です。
autovacuum_vacuum_threshold (integer)
#
Specifies the minimum number of updated or deleted tuples needed
to trigger a <command>VACUUM</command> in any one table.
The default is 50 tuples.
This parameter can only be set in the <filename>postgresql.conf</filename>
file or on the server command line;
but the setting can be overridden for individual tables by
changing table storage parameters.
ある任意のテーブルでVACUUMが起動されるのに必要な更新もしくは削除されたタプルの最小数を指定します。
デフォルトは50タプルです。
このパラメータは、postgresql.confファイルか、サーバのコマンドラインでのみ設定可能です。
ただし、この設定はテーブル格納パラメータの変更により、それぞれのテーブルに対して上書きすることができます。
autovacuum_vacuum_insert_threshold (integer)
#
Specifies the number of inserted tuples needed to trigger a
<command>VACUUM</command> in any one table.
The default is 1000 tuples. If -1 is specified, autovacuum will not
trigger a <command>VACUUM</command> operation on any tables based on
the number of inserts.
This parameter can only be set in the <filename>postgresql.conf</filename>
file or on the server command line;
but the setting can be overridden for individual tables by
changing table storage parameters.
ある任意のテーブルでVACUUMが起動されるのに必要な挿入タプル数を設定します。
デフォルトは1000タプルです。
-1が指定されると、自動バキュームが挿入タプル数に基づいてVACUUM操作を引き起こすことはなくなります。
このパラメータは、postgresql.confファイルか、サーバのコマンドラインでのみ設定可能です。
ただし、この設定はテーブル格納パラメータの変更により、それぞれのテーブルに対して上書きすることができます。
autovacuum_analyze_threshold (integer)
#
Specifies the minimum number of inserted, updated or deleted tuples
needed to trigger an <command>ANALYZE</command> in any one table.
The default is 50 tuples.
This parameter can only be set in the <filename>postgresql.conf</filename>
file or on the server command line;
but the setting can be overridden for individual tables by
changing table storage parameters.
ある任意のテーブルでANALYZEが起動されるのに必要な、挿入、更新、もしくは削除されたタプルの最小数を指定します。
デフォルトは50タプルです。
このパラメータは、postgresql.confファイルか、サーバのコマンドラインでのみ設定可能です。
ただし、この設定はテーブル格納パラメータの変更により、それぞれのテーブルに対して上書きすることができます。
autovacuum_vacuum_scale_factor (floating point)
#
Specifies a fraction of the table size to add to
<varname>autovacuum_vacuum_threshold</varname>
when deciding whether to trigger a <command>VACUUM</command>.
The default is <literal>0.2</literal> (20% of table size).
This parameter can only be set in the <filename>postgresql.conf</filename>
file or on the server command line;
but the setting can be overridden for individual tables by
changing table storage parameters.
VACUUMを起動するかどうか決定するときに、autovacuum_vacuum_thresholdに追加するテーブルサイズの割合を指定します。
デフォルトは0.2(テーブルサイズの20%)です。
このパラメータは、postgresql.confファイルか、サーバのコマンドラインでのみ設定可能です。
ただし、この設定はテーブル格納パラメータの変更により、それぞれのテーブルに対して上書きすることができます。
autovacuum_vacuum_insert_scale_factor (floating point)
#
Specifies a fraction of the unfrozen pages in the table to add to
<varname>autovacuum_vacuum_insert_threshold</varname> when deciding
whether to trigger a <command>VACUUM</command>. The default is
<literal>0.2</literal> (20% of unfrozen pages in table). This
parameter can only be set in the <filename>postgresql.conf</filename>
file or on the server command line; but the setting can be overridden
for individual tables by changing table storage parameters.
VACUUMを起動するかどうか決めるときに、autovacuum_vacuum_insert_thresholdに追加するテーブルの未凍結なページの割合を指定します。
デフォルトは0.2(テーブルで未凍結なページの20%)です。
このパラメータは、postgresql.confファイルか、サーバのコマンドラインでのみ設定可能です。
ただし、この設定はテーブル格納パラメータの変更により、それぞれのテーブルに対して上書きすることができます。
autovacuum_analyze_scale_factor (floating point)
#
Specifies a fraction of the table size to add to
<varname>autovacuum_analyze_threshold</varname>
when deciding whether to trigger an <command>ANALYZE</command>.
The default is <literal>0.1</literal> (10% of table size).
This parameter can only be set in the <filename>postgresql.conf</filename>
file or on the server command line;
but the setting can be overridden for individual tables by
changing table storage parameters.
ANALYZEを起動するかどうか決めるときに、autovacuum_analyze_thresholdに追加するテーブルサイズの割合を指定します。
デフォルトは0.1(テーブルサイズの10%)です。
このパラメータは、postgresql.confファイルか、サーバのコマンドラインでのみ設定可能です。
ただし、この設定はテーブル格納パラメータの変更により、それぞれのテーブルに対して上書きすることができます。
autovacuum_vacuum_max_threshold (integer)
#
Specifies the maximum number of updated or deleted tuples needed to
trigger a <command>VACUUM</command> in any one table, i.e., a limit on
the value calculated with
<varname>autovacuum_vacuum_threshold</varname> and
<varname>autovacuum_vacuum_scale_factor</varname>. The default is
100,000,000 tuples. If -1 is specified, autovacuum will not enforce a
maximum number of updated or deleted tuples that will trigger a
<command>VACUUM</command> operation. This parameter can only be set
in the <filename>postgresql.conf</filename> file or on the server
command line; but the setting can be overridden for individual tables
by changing storage parameters.
ある任意のテーブルでVACUUMが起動されるのに必要な更新または削除されたタプルの最大数、つまりautovacuum_vacuum_thresholdとautovacuum_vacuum_scale_factorで計算される値の上限値を指定します。
デフォルトは1億タプルです。
-1を指定すると、自動バキュームは、VACUUM操作を起動する更新または削除されたタプルの最大数を強制しません。
このパラメータは、postgresql.confファイルか、サーバのコマンドラインでのみ設定可能です。
ただし、この設定はテーブル格納パラメータの変更により、それぞれのテーブルに対して上書きすることができます。
autovacuum_freeze_max_age (integer)
#
Specifies the maximum age (in transactions) that a table's
<structname>pg_class</structname>.<structfield>relfrozenxid</structfield> field can
attain before a <command>VACUUM</command> operation is forced
to prevent transaction ID wraparound within the table.
Note that the system will launch autovacuum processes to
prevent wraparound even when autovacuum is otherwise disabled.
トランザクションID周回を防ぐためにVACUUM操作が強制される前までにテーブルのpg_class.relfrozenxidフィールドが到達できる(トランザクションにおける)最大の年代を指定します。
自動バキュームが無効であった時でも、システムは周回を防ぐために自動バキューム子プロセスを起動することに注意してください。
Vacuum also allows removal of old files from the
<filename>pg_xact</filename> subdirectory, which is why the default
is a relatively low 200 million transactions.
This parameter can only be set at server start, but the setting
can be reduced for individual tables by
changing table storage parameters.
For more information see <xref linkend="vacuum-for-wraparound"/>.
バキューム処理は同時にpg_xactサブディレクトリから古いファイルの削除を許可します。
これが、比較的低い2億トランザクションがデフォルトである理由です。
このパラメータはサーバ起動時にのみ設定可能です。
しかし、この設定はテーブル格納パラメータの変更により、それぞれのテーブルで減らすことができます。
詳細は24.1.5を参照してください。
autovacuum_multixact_freeze_max_age (integer)
#
Specifies the maximum age (in multixacts) that a table's
<structname>pg_class</structname>.<structfield>relminmxid</structfield> field can
attain before a <command>VACUUM</command> operation is forced to
prevent multixact ID wraparound within the table.
Note that the system will launch autovacuum processes to
prevent wraparound even when autovacuum is otherwise disabled.
トランザクションID周回を防ぐためにVACUUM操作が強制される前までにテーブルのpg_class.relminmxidフィールドが到達できる(マルチトランザクションにおける)最大の年代を指定します。
自動バキュームが無効であった時でも、システムは周回を防ぐために自動バキューム子プロセスを起動することに注意してください。
Vacuuming multixacts also allows removal of old files from the
<filename>pg_multixact/members</filename> and <filename>pg_multixact/offsets</filename>
subdirectories, which is why the default is a relatively low
400 million multixacts.
This parameter can only be set at server start, but the setting can
be reduced for individual tables by changing table storage parameters.
For more information see <xref linkend="vacuum-for-multixact-wraparound"/>.
マルチトランザクションのバキューム処理は同時にpg_multixact/membersとpg_multixact/offsetsサブディレクトリから古いファイルの削除を許可します。
これが、比較的低い4億トランザクションがデフォルトである理由です。
このパラメータはサーバ起動時にのみ設定可能です。
しかし、この設定はテーブル格納パラメータの変更により、それぞれのテーブルで減らすことができます。
詳細は24.1.5.1を参照してください。
autovacuum_vacuum_cost_delay (floating point)
#
Specifies the cost delay value that will be used in automatic
<command>VACUUM</command> operations. If -1 is specified, the regular
<xref linkend="guc-vacuum-cost-delay"/> value will be used.
If this value is specified without units, it is taken as milliseconds.
The default value is 2 milliseconds.
This parameter can only be set in the <filename>postgresql.conf</filename>
file or on the server command line;
but the setting can be overridden for individual tables by
changing table storage parameters.
自動VACUUM操作に使用されるコスト遅延値を指定します。
-1が指定されると、通常のvacuum_cost_delayの値が使用されます。
この値が単位なしで指定された場合は、ミリ秒単位であるとみなします。
デフォルト値は2ミリ秒です。
このパラメータは、postgresql.confファイルか、サーバのコマンドラインでのみ設定可能です。
ただし、この設定はテーブル格納パラメータの変更により、それぞれのテーブルに対して上書きすることができます。
autovacuum_vacuum_cost_limit (integer)
#
Specifies the cost limit value that will be used in automatic
<command>VACUUM</command> operations. If <literal>-1</literal>
is specified (which is the default), the regular
<xref linkend="guc-vacuum-cost-limit"/> value will be used. Note that
the value is distributed proportionally among the running autovacuum
workers, if there is more than one, so that the sum of the limits for
each worker does not exceed the value of this variable.
This parameter can only be set in the <filename>postgresql.conf</filename>
file or on the server command line;
but the setting can be overridden for individual tables by
changing table storage parameters.
自動VACUUM操作に使用されるコスト限界値を指定します。
(デフォルトの)-1が指定されると、通常のvacuum_cost_limitの値が使用されます。
実行中の自動バキュームワーカーが複数存在する場合、この値はすべてのワーカーに比例分配されることに注意してください。
したがって各ワーカーの上限の合計がこの変数の値を超えることはありません。
このパラメータは、postgresql.confファイルか、サーバのコマンドラインでのみ設定可能です。
ただし、この設定はテーブル格納パラメータの変更により、それぞれのテーブルに対して上書きすることができます。
During the execution of <xref linkend="sql-vacuum"/>
and <xref linkend="sql-analyze"/>
commands, the system maintains an
internal counter that keeps track of the estimated cost of the
various I/O operations that are performed. When the accumulated
cost reaches a limit (specified by
<varname>vacuum_cost_limit</varname>), the process performing
the operation will sleep for a short period of time, as specified by
<varname>vacuum_cost_delay</varname>. Then it will reset the
counter and continue execution.
VACUUM および ANALYZE コマンドの実行中、実行される各種I/O操作の予測コストを追跡し続ける内部カウンタをシステムが保守します。
累積されたコストが(vacuum_cost_limitで指定された)限度に達すると、操作を実行しているプロセスはvacuum_cost_delayで指定されたちょっとの間スリープします。その後、カウンタをリセットし、実行を継続します。
The intent of this feature is to allow administrators to reduce
the I/O impact of these commands on concurrent database
activity. There are many situations where it is not
important that maintenance commands like
<command>VACUUM</command> and <command>ANALYZE</command> finish
quickly; however, it is usually very important that these
commands do not significantly interfere with the ability of the
system to perform other database operations. Cost-based vacuum
delay provides a way for administrators to achieve this.
この機能の目的は、同時に実行されているデータベースの活動に対するこれらコマンドによるI/Oへの影響を、管理者が軽減できるようにすることです。
VACUUM および ANALYZEの様な保守用コマンドが即座に終了することが重要ではない事態が数多くあります。
しかし、他のデータベースの操作を行うに当たって、これらのコマンドがシステムの能力に多大な阻害を与えないことは通常とても重要です。
コストに基づいたvacuum遅延はこれを実現するための方法を管理者に提供します。
This feature is disabled by default for manually issued
<command>VACUUM</command> commands. To enable it, set the
<varname>vacuum_cost_delay</varname> variable to a nonzero
value.
手動で実行したVACUUMコマンドについては、デフォルトでこの機能は無効になっています。
有効にするには、vacuum_cost_delay変数をゼロでない値に設定します。
vacuum_cost_delay (floating point)
#
The amount of time that the process will sleep when the cost
limit has been exceeded. If this value is specified without
units, it is taken as milliseconds. The default value is
<literal>0</literal>, which disables the cost-based vacuum delay
feature. Positive values enable cost-based vacuuming.
コストの上限を越えた場合に、プロセスがスリープする時間の長さです。
この値が単位なしで指定された場合は、ミリ秒単位であるとみなします。
デフォルトの値は0で、コストに基づいたvacuum遅延機能を無効にします。
正の整数はコストに基づいたvacuumを有効にします。
When using cost-based vacuuming, appropriate values for
<varname>vacuum_cost_delay</varname> are usually quite small, perhaps
less than 1 millisecond. While <varname>vacuum_cost_delay</varname>
can be set to fractional-millisecond values, such delays may not be
measured accurately on older platforms. On such platforms,
increasing <command>VACUUM</command>'s throttled resource consumption
above what you get at 1ms will require changing the other vacuum cost
parameters. You should, nonetheless,
keep <varname>vacuum_cost_delay</varname> as small as your platform
will consistently measure; large delays are not helpful.
コストに基づいたバキューム処理を使用する場合、vacuum_cost_delayの適切な値は通常かなり小さくなり、おそらく1ミリ秒以下になります。
バキュームによるリソース消費の調整は、他のバキュームのコストパラメータを変更して行うことが最善です。
vacuum_cost_delayを1ミリ秒以下に設定することは可能ですが、そうした遅延は古いプラットフォームでは正確には計測されないかも知れません。
そうしたプラットフォームでは、VACUUMのリソース消費制限を1ミリ秒のときに得られる値以上にするには、他のVACUUMコストパラメータの変更が必要となるでしょう。
とは言うものの、使用するプラットフォームで常に計測できる範囲でvacuum_cost_delayをできるだけ小さくするようにしてください。
大きな遅延は助けになりません。
vacuum_cost_page_hit (integer)
#
The estimated cost for vacuuming a buffer found in the shared
buffer cache. It represents the cost to lock the buffer pool,
lookup the shared hash table and scan the content of the page.
The default value is <literal>1</literal>.
共有バッファキャッシュにあるバッファをバキュームするための推定コストです。
これは、バッファプールのロック、共有ハッシュテーブルの検索、およびページ内容をスキャンするためのコストを示します。
デフォルトの値は1です。
vacuum_cost_page_miss (integer)
#
The estimated cost for vacuuming a buffer that has to be read from
disk. This represents the effort to lock the buffer pool,
lookup the shared hash table, read the desired block in from
the disk and scan its content. The default value is
<literal>2</literal>.
ディスクから読み込まれなければならないバッファをバキュームするための推定コストです。
これは、バッファプールロックの試み、共有ハッシュテーブルの参照、ディスクから目的ブロックの読み込み、そしてその内容をスキャンするためのコストを示します。
デフォルトの値は2です。
vacuum_cost_page_dirty (integer)
#
The estimated cost charged when vacuum modifies a block that was
previously clean. It represents the extra I/O required to
flush the dirty block out to disk again. The default value is
<literal>20</literal>.
以前掃除されたブロックをバキュームで変更するときに必要な推定コストです。
これは、ダーティブロックを再度ディスクにフラッシュするのに必要な追加のI/Oを表します。
デフォルトの値は20です。
vacuum_cost_limit (integer)
#
This is the accumulated cost that will cause the vacuuming
process to sleep for <varname>vacuum_cost_delay</varname>. The
default is <literal>200</literal>.
これは、バキューム処理をvacuum_cost_delayの間スリープさせるための累積コストです。
デフォルトの値は200です。
There are certain operations that hold critical locks and should
therefore complete as quickly as possible. Cost-based vacuum
delays do not occur during such operations. Therefore it is
possible that the cost accumulates far higher than the specified
limit. To avoid uselessly long delays in such cases, the actual
delay is calculated as <varname>vacuum_cost_delay</varname> *
<varname>accumulated_balance</varname> /
<varname>vacuum_cost_limit</varname> with a maximum of
<varname>vacuum_cost_delay</varname> * 4.
重要なロックを保有し可能なかぎり早急に完了しなければならないある種の操作があります。コストに基づいたvacuum遅延はこの様な操作では起こりません。
したがって、コストの累計が指定された限度をかなり高く超える可能性があります。
このような場合無駄な長い遅延を防止するため、実際の遅延はvacuum_cost_delay * 4 を上限として、以下のように計算されます。
vacuum_cost_delay * accumulated_balance / vacuum_cost_limit
vacuum_truncate (boolean)
#
Enables or disables vacuum to try to truncate off any empty pages at
the end of the table. The default value is <literal>true</literal>.
If <literal>true</literal>, <command>VACUUM</command> and autovacuum
do the truncation and the disk space for the truncated pages is
returned to the operating system. Note that the truncation requires
an <literal>ACCESS EXCLUSIVE</literal> lock on the table. The
<literal>TRUNCATE</literal> parameter of
<link linkend="sql-vacuum"><command>VACUUM</command></link>, if
specified, overrides the value of this parameter. The setting can
also be overridden for individual tables by changing table storage
parameters.
テーブルの最後にある空のページを切り捨てようとするバキュームの機能を有効または無効にします。
デフォルト値はtrueです。
trueに設定すると、VACUUMと自動バキュームが切り捨てを行い、切り捨てられたページのディスク容量がオペレーティングシステムに返されます。
切り捨てにはテーブルのACCESS EXCLUSIVEロックが必要であることに注意してください。
VACUUMのTRUNCATEパラメータが指定されている場合、このパラメータの値を上書きします。
この設定はテーブル格納パラメータの変更により、それぞれのテーブルに対して上書きすることができます。
To maintain correctness even after transaction IDs wrap around,
<productname>PostgreSQL</productname> marks rows that are sufficiently
old as <emphasis>frozen</emphasis>. These rows are visible to everyone;
other transactions do not need to examine their inserting XID to
determine visibility. <command>VACUUM</command> is responsible for
marking rows as frozen. The following settings control
<command>VACUUM</command>'s freezing behavior and should be tuned based
on the XID consumption rate of the system and data access patterns of the
dominant workloads. See <xref linkend="vacuum-for-wraparound"/> for more
information on transaction ID wraparound and tuning these parameters.
トランザクションIDが周回した後でも正確さを維持するために、PostgreSQLは十分に古い行を凍結済みとして印付けます。
これらの行はすべてのユーザに表示されます。
他のトランザクションでは、挿入したXIDを調べて可視性を判断する必要はありません。
VACUUMには、行を凍結状態として印付ける責任があります。
次の設定はVACUUMの凍結動作を制御します。
これらの設定は、システムのXID消費率と主要なワークロードのデータ参照パターンに基づいて調整する必要があります。
トランザクションIDの周回とこれらのパラメータの調整の詳細については、24.1.5を参照してください。
vacuum_freeze_table_age (integer)
#
<command>VACUUM</command> performs an aggressive scan if the table's
<structname>pg_class</structname>.<structfield>relfrozenxid</structfield> field has reached
the age specified by this setting. An aggressive scan differs from
a regular <command>VACUUM</command> in that it visits every page that might
contain unfrozen XIDs or MXIDs, not just those that might contain dead
tuples. The default is 150 million transactions. Although users can
set this value anywhere from zero to two billion, <command>VACUUM</command>
will silently limit the effective value to 95% of
<xref linkend="guc-autovacuum-freeze-max-age"/>, so that a
periodic manual <command>VACUUM</command> has a chance to run before an
anti-wraparound autovacuum is launched for the table. For more
information see
<xref linkend="vacuum-for-wraparound"/>.
テーブルのpg_class.relfrozenxidフィールドがこの設定で指定した年代に達すると、VACUUMは積極的なテーブルスキャンを行います。
積極的なスキャンは、無効タプルを含む可能性のあるページだけではなく、凍結されていないXIDあるいはMXIDを含むすべてのページを読む点で通常のVACUUMとは異なります。
デフォルトは1.5億トランザクションです。
ユーザはこの値をゼロから20億までの任意の値に設定することができますが、周回問題対策の自動バキュームがテーブルに対して起動する前に定期的な手動VACUUMが実行する機会を持つように、VACUUMは警告することなく実際の値をautovacuum_freeze_max_ageの95%に制限します。
詳細は24.1.5を参照してください。
vacuum_freeze_min_age (integer)
#
Specifies the cutoff age (in transactions) that
<command>VACUUM</command> should use to decide whether to
trigger freezing of pages that have an older XID.
The default is 50 million transactions. Although
users can set this value anywhere from zero to one billion,
<command>VACUUM</command> will silently limit the effective value to half
the value of <xref linkend="guc-autovacuum-freeze-max-age"/>, so
that there is not an unreasonably short time between forced
autovacuums. For more information see <xref
linkend="vacuum-for-wraparound"/>.
VACUUMが、古いXIDを持つページの凍結を行うかどうかを決定する、カットオフ年代を(トランザクション単位で)指定します。
デフォルトは5千万トランザクションです。
ユーザはこの値をゼロから10億までの間で任意の値に設定することができますが、VACUUMは警告することなく実際の値をautovacuum_freeze_max_ageの半分の値まで制限します。
このため、強制的な自動バキュームの間隔が不合理に短くなることはありません。
詳細は24.1.5を参照してください。
vacuum_failsafe_age (integer)
#
Specifies the maximum age (in transactions) that a table's
<structname>pg_class</structname>.<structfield>relfrozenxid</structfield>
field can attain before <command>VACUUM</command> takes
extraordinary measures to avoid system-wide transaction ID
wraparound failure. This is <command>VACUUM</command>'s
strategy of last resort. The failsafe typically triggers
when an autovacuum to prevent transaction ID wraparound has
already been running for some time, though it's possible for
the failsafe to trigger during any <command>VACUUM</command>.
VACUUMがシステム全体に渡るトランザクションID周回障害を避けるために異例の措置を取るようになる、テーブルのpg_class.relfrozenxidフィールドが到達する最大の(トランザクション数単位での)年代を指定します。
これはVACUUMの最後の手段となる戦略です。
この安全機構は典型的には、トランザクションID周回を防ぐための自動バキュームがすでに走っているときに起動されます。
しかし、すべてのVACUUMの実行中にこの安全機構が起動する可能性があります。
When the failsafe is triggered, any cost-based delay that is
in effect will no longer be applied, further non-essential
maintenance tasks (such as index vacuuming) are bypassed, and any
<glossterm linkend="glossary-buffer-access-strategy">Buffer Access Strategy</glossterm>
in use will be disabled resulting in <command>VACUUM</command> being
free to make use of all of
<glossterm linkend="glossary-shared-memory">shared buffers</glossterm>.
この安全機構が起動すると、すべての有効なコストに基づく遅延はもはや適用されず、(インデックスのバキュームのような)必須ではない保守タスクは迂回されます。
使用中のバッファアクセスストラテジは無効になり、その結果VACUUMは共有バッファのすべてを自由に使用することになります。
The default is 1.6 billion transactions. Although users can
set this value anywhere from zero to 2.1 billion,
<command>VACUUM</command> will silently adjust the effective
value to no less than 105% of <xref
linkend="guc-autovacuum-freeze-max-age"/>.
デフォルトは16億トランザクションです。
ユーザはこの値をゼロから21億までの間で設定できますが、VACUUMは警告することなく実際の値をautovacuum_freeze_max_ageの105%よりも小さくならないように調整します。
vacuum_multixact_freeze_table_age (integer)
#
<command>VACUUM</command> performs an aggressive scan if the table's
<structname>pg_class</structname>.<structfield>relminmxid</structfield> field has reached
the age specified by this setting. An aggressive scan differs from
a regular <command>VACUUM</command> in that it visits every page that might
contain unfrozen XIDs or MXIDs, not just those that might contain dead
tuples. The default is 150 million multixacts.
Although users can set this value anywhere from zero to two billion,
<command>VACUUM</command> will silently limit the effective value to 95% of
<xref linkend="guc-autovacuum-multixact-freeze-max-age"/>, so that a
periodic manual <command>VACUUM</command> has a chance to run before an
anti-wraparound is launched for the table.
For more information see <xref linkend="vacuum-for-multixact-wraparound"/>.
pg_class.relminmxidフィールドがこの設定値で指定した年代に達すると、VACUUMはテーブルの積極的なスキャンを行います。
積極的なスキャンは、無効タプルを含む可能性のあるページだけではなく、凍結されていないXIDあるいはMXIDを含むすべてのページを読む点で通常のVACUUMとは異なります。
デフォルトは1億5千万トランザクションです。
ユーザはゼロから20億まで任意の値を設定できますが、テーブルに対して周回防止処理が起動される前に定期的な手動VACUUMが走ることができるように、VACUUMは警告することなく実際の値をautovacuum_multixact_freeze_max_ageの95%まで制限します。
詳細は24.1.5.1を参照してください。
vacuum_multixact_freeze_min_age (integer)
#
Specifies the cutoff age (in multixacts) that <command>VACUUM</command>
should use to decide whether to trigger freezing of pages with
an older multixact ID. The default is 5 million multixacts.
Although users can set this value anywhere from zero to one billion,
<command>VACUUM</command> will silently limit the effective value to half
the value of <xref linkend="guc-autovacuum-multixact-freeze-max-age"/>,
so that there is not an unreasonably short time between forced
autovacuums.
For more information see <xref linkend="vacuum-for-multixact-wraparound"/>.
VACUUMが、古いマルチトランザクションIDを持つページの凍結を行うかどうかを決定する、カットオフ年代を(マルチトランザクション単位で)指定します。
デフォルトは500万マルチトランザクションです。
ユーザはゼロから10億まで任意の値を設定できますが、強制的な自動バキュームの間隔が短くなり過ぎないように、VACUUMは警告することなく実際の値をautovacuum_multixact_freeze_max_ageの半分の値に制限します。
詳細は24.1.5.1を参照してください。
vacuum_multixact_failsafe_age (integer)
#
Specifies the maximum age (in multixacts) that a table's
<structname>pg_class</structname>.<structfield>relminmxid</structfield>
field can attain before <command>VACUUM</command> takes
extraordinary measures to avoid system-wide multixact ID
wraparound failure. This is <command>VACUUM</command>'s
strategy of last resort. The failsafe typically triggers when
an autovacuum to prevent transaction ID wraparound has already
been running for some time, though it's possible for the
failsafe to trigger during any <command>VACUUM</command>.
VACUUMがシステム全体マルチトランザクションID周回障害を避けるために異例の措置を取るようになる、テーブルのpg_class.relminmxidフィールドが到達する最大の(マルチトランザクション数単位での)年代を指定します。
これはVACUUM最後の手段となる戦略です。
この安全機構は典型的には、マルチトランザクションID周回を防ぐための自動バキュームがすでに走っているときに起動されます。
しかし、すべてのVACUUMの実行中にこの安全機構が起動する可能性があります。
When the failsafe is triggered, any cost-based delay that is in effect will no longer be applied, and further non-essential maintenance tasks (such as index vacuuming) are bypassed. この安全機構が起動すると、すべての有効なコストに基づく遅延はもはや適用されず、(インデックスのバキュームのような)必須ではない保守タスクは迂回されます。
The default is 1.6 billion multixacts. Although users can set
this value anywhere from zero to 2.1 billion,
<command>VACUUM</command> will silently adjust the effective
value to no less than 105% of <xref
linkend="guc-autovacuum-multixact-freeze-max-age"/>.
デフォルトは16億マルチトランザクションです。
ユーザはこの値をゼロから21億までの間で設定できますが、VACUUMは警告することなく実際の値をautovacuum_multixact_freeze_max_ageの105%よりも小さくならないように調整します。
vacuum_max_eager_freeze_failure_rate (floating point)
#
Specifies the maximum number of pages (as a fraction of total pages in
the relation) that <command>VACUUM</command> may scan and
<emphasis>fail</emphasis> to set all-frozen in the visibility map
before disabling eager scanning. A value of <literal>0</literal>
disables eager scanning altogether. The default is
<literal>0.03</literal> (3%).
熱心なスキャンを無効にする前に、VACUUMがスキャンした時に可視性マップで全凍結と設定することに失敗するページの最大数(そのリレーション内の全ページ数に対する割合)を指定します。
値が0の場合、熱心なスキャンは完全に無効になります。
デフォルトは0.03(3%)です。
Note that when eager scanning is enabled, only freeze failures count against the cap, not successful freezing. Successful page freezes are capped internally at 20% of the all-visible but not all-frozen pages in the relation. Capping successful page freezes helps amortize the overhead across multiple normal vacuums and limits the potential downside of wasted eager freezes of pages that are modified again before the next aggressive vacuum. 熱心なスキャンを有効にすると、凍結の失敗のみがカウントされ、凍結の成功はカウントされないことに注意してください。 凍結に成功するページは、内部的には、そのリレーション内の全可視ではあるが全凍結ではないページの20%に制限されます。 凍結に成功するページを制限すると、複数の通常のバキューム処理でオーバーヘッドを分散でき、次の積極的バキュームの前に再度修正されたページに対する熱心な凍結処理が無駄になるという潜在的な欠点を抑えることができます。
This parameter can only be set in the
<filename>postgresql.conf</filename> file or on the server command
line; but the setting can be overridden for individual tables by
changing the
<link linkend="reloption-vacuum-max-eager-freeze-failure-rate">
corresponding table storage parameter</link>.
For more information on tuning vacuum's freezing behavior,
see <xref linkend="vacuum-for-wraparound"/>.
このパラメータは、postgresql.confファイルか、サーバのコマンドラインでのみ設定可能です。
ただし、この設定は対応するテーブル格納パラメータの変更により、それぞれのテーブルに対して上書きすることができます。
バキュームの凍結動作の詳細については、24.1.5を参照してください。