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

28.4. 進捗状況のレポート #

<title>Progress Reporting</title>

<productname>PostgreSQL</productname> has the ability to report the progress of certain commands during command execution. Currently, the only commands which support progress reporting are <command>ANALYZE</command>, <command>CLUSTER</command>, <command>CREATE INDEX</command>, <command>VACUUM</command>, <command>COPY</command>, and <xref linkend="protocol-replication-base-backup"/> (i.e., replication command that <xref linkend="app-pgbasebackup"/> issues to take a base backup). This may be expanded in the future. PostgreSQLは、何らかのコマンドの実行中に進捗状況をレポートする能力があります。 現在、進捗状況のレポートをサポートしているのは、ANALYZECLUSTERCREATE INDEXVACUUMCOPY、および、BASE_BACKUP(すなわち、pg_basebackupがベースバックアップのために発行するレプリケーションコマンド)のみです。 将来的にサポートされるコマンドが拡大される可能性があります。

28.4.1. ANALYZEの進捗状況のレポート #

<title>ANALYZE Progress Reporting</title>

Whenever <command>ANALYZE</command> is running, the <structname>pg_stat_progress_analyze</structname> view will contain a row for each backend that is currently running that command. The tables below describe the information that will be reported and provide information about how to interpret it. ANALYZEが実行されているときにはいつでも、pg_stat_progress_analyzeビューには現在コマンドを実行している各バックエンドごとの行が含まれます。 以下の表は、報告される情報を説明し、どのように解釈するかの情報を提供します。

表28.37 pg_stat_progress_analyzeビュー

<title><structname>pg_stat_progress_analyze</structname> View</title>

Column Type 列 型

Description 説明

pid integer

Process ID of backend. バックエンドのプロセスIDです。

datid oid

OID of the database to which this backend is connected. バックエンドが接続されているデータベースのOIDです。

datname name

Name of the database to which this backend is connected. バックエンドが接続されているデータベース名です。

relid oid

OID of the table being analyzed. 解析されているテーブルのOIDです。

phase text

Current processing phase. See <xref linkend="analyze-phases"/>. 現在処理中のフェーズです。 表 28.38を参照してください。

sample_blks_total bigint

Total number of heap blocks that will be sampled. サンプルされるヒープブロックの総数です。

sample_blks_scanned bigint

Number of heap blocks scanned. スキャンされたヒープブロックの数です。

ext_stats_total bigint

Number of extended statistics. 拡張統計情報の個数です。

ext_stats_computed bigint

Number of extended statistics computed. This counter only advances when the phase is <literal>computing extended statistics</literal>. 計算された拡張統計情報の個数です。 このカウンタはフェーズがcomputing extended statisticsの時にのみ増加します。

child_tables_total bigint

Number of child tables. 子テーブルの数です。

child_tables_done bigint

Number of child tables scanned. This counter only advances when the phase is <literal>acquiring inherited sample rows</literal>. スキャンされた子テーブルの数です。 このカウンタはフェーズがacquiring inherited sample rowsの時にのみ増加します。

current_child_table_relid oid

OID of the child table currently being scanned. This field is only valid when the phase is <literal>acquiring inherited sample rows</literal>. 現在スキャンされている子テーブルのOIDです。 このフィールドはフェーズがacquiring inherited sample rowsの時のみ有効です。


表28.38 ANALYZEのフェーズ

<title>ANALYZE Phases</title>
フェーズ説明
initializing The command is preparing to begin scanning the heap. This phase is expected to be very brief. コマンドはヒープをスキャンし始める準備をしています。 このフェーズは非常に短時間であると予想されます。
acquiring sample rows The command is currently scanning the table given by <structfield>relid</structfield> to obtain sample rows. コマンドはサンプル行を得るため、relidで指定されたテーブルを現在スキャンしています。
acquiring inherited sample rows The command is currently scanning child tables to obtain sample rows. Columns <structfield>child_tables_total</structfield>, <structfield>child_tables_done</structfield>, and <structfield>current_child_table_relid</structfield> contain the progress information for this phase. コマンドはサンプル行を得るため、子テーブルを現在スキャンしています。 列child_tables_totalchild_tables_donecurrent_child_table_relidはこのフェーズの進捗情報を含みます。
computing statistics The command is computing statistics from the sample rows obtained during the table scan. コマンドはテーブルスキャンの間に得られたサンプルから統計情報を計算しています。
computing extended statistics The command is computing extended statistics from the sample rows obtained during the table scan. コマンドはテーブルスキャンの間に得られたサンプルから拡張統計情報を計算しています。
finalizing analyze The command is updating <structname>pg_class</structname>. When this phase is completed, <command>ANALYZE</command> will end. コマンドはpg_classを更新しています。 このフェーズが完了すれば、ANALYZEは終わります。

注記

Note that when <command>ANALYZE</command> is run on a partitioned table, all of its partitions are also recursively analyzed. In that case, <command>ANALYZE</command> progress is reported first for the parent table, whereby its inheritance statistics are collected, followed by that for each partition. ANALYZEがパーティションテーブルで実行される場合は、そのパーティションテーブルのすべても再帰的に解析されることに注意してください。 その場合、ANALYZEの進捗はまず親テーブルについて報告され、それによってその継承の統計情報が集められ、各パーティションの報告が続きます。

28.4.2. CLUSTERの進捗状況のレポート #

<title>CLUSTER Progress Reporting</title>

Whenever <command>CLUSTER</command> or <command>VACUUM FULL</command> is running, the <structname>pg_stat_progress_cluster</structname> view will contain a row for each backend that is currently running either command. The tables below describe the information that will be reported and provide information about how to interpret it. CLUSTERVACUUM FULLが実行されているときにはいつでも、pg_stat_progress_clusterビューには現在いずれかのコマンドを実行している各バックエンドごとの行が含まれます。 以下の表は、報告される情報を説明し、どのように解釈するかの情報を提供します。

表28.39 pg_stat_progress_clusterビュー

<title><structname>pg_stat_progress_cluster</structname> View</title>

Column Type 列 型

Description 説明

pid integer

Process ID of backend. バックエンドのプロセスIDです。

datid oid

OID of the database to which this backend is connected. バックエンドが接続されているデータベースのOIDです。

datname name

Name of the database to which this backend is connected. バックエンドが接続されているデータベースの名前です。

relid oid

OID of the table being clustered. クラスタ化されているテーブルのOIDです。

command text

The command that is running. Either <literal>CLUSTER</literal> or <literal>VACUUM FULL</literal>. 実行しているコマンドです。 CLUSTERVACUUM FULLのいずれかです。

phase text

Current processing phase. See <xref linkend="cluster-phases"/>. 現在処理しているフェーズです。 表 28.40を参照してください。

cluster_index_relid oid

If the table is being scanned using an index, this is the OID of the index being used; otherwise, it is zero. テーブルがインデックスを使ってスキャンされているのであれば、これは使われているインデックスのOIDで、さもなくばゼロです。

heap_tuples_scanned bigint

Number of heap tuples scanned. This counter only advances when the phase is <literal>seq scanning heap</literal>, <literal>index scanning heap</literal> or <literal>writing new heap</literal>. スキャンされたヒープタプルの数です。 このカウンタは、フェーズがseq scanning heapindex scanning heap、または、writing new heapであるときのみ増加します。

heap_tuples_written bigint

Number of heap tuples written. This counter only advances when the phase is <literal>seq scanning heap</literal>, <literal>index scanning heap</literal> or <literal>writing new heap</literal>. 書かれたヒープタプルの数です。 このカウンタは、フェーズがseq scanning heapindex scanning heap、または、writing new heapであるときのみ増加します。

heap_blks_total bigint

Total number of heap blocks in the table. This number is reported as of the beginning of <literal>seq scanning heap</literal>. テーブル内のヒープブロックの総数です。 この数にはseq scanning heapの開始時の値が報告されます。

heap_blks_scanned bigint

Number of heap blocks scanned. This counter only advances when the phase is <literal>seq scanning heap</literal>. スキャンされたヒープブロックの数です。 このカウンタは、フェーズがseq scanning heapであるときのみ増加します。

index_rebuild_count bigint

Number of indexes rebuilt. This counter only advances when the phase is <literal>rebuilding index</literal>. インデックス再作成の数です。 このカウンタはフェーズがrebuilding indexであるときのみ増加します。


表28.40 CLUSTERとVACUUM FULLのフェーズ

<title>CLUSTER and VACUUM FULL Phases</title>
フェーズ説明
initializing The command is preparing to begin scanning the heap. This phase is expected to be very brief. コマンドはヒープのスキャンを開始する準備をしています。 本フェーズはごく短時間になると予想されます。
seq scanning heap The command is currently scanning the table using a sequential scan. コマンドは現在、テーブルをシーケンシャルスキャンを使ってスキャンしています。
index scanning heap <command>CLUSTER</command> is currently scanning the table using an index scan. CLUSTERは現在、インデックススキャンを使ってテーブルをスキャンしています。
sorting tuples <command>CLUSTER</command> is currently sorting tuples. CLUSTERは現在、タプルをソートしています。
writing new heap <command>CLUSTER</command> is currently writing the new heap. CLUSTERが新しいヒープに書き込んでいます。
swapping relation files The command is currently swapping newly-built files into place. コマンドは現在、新たに構築したファイルを置き換えて設置しています。
rebuilding index The command is currently rebuilding an index. コマンドは現在、インデックスを再構築しています。
performing final cleanup The command is performing final cleanup. When this phase is completed, <command>CLUSTER</command> or <command>VACUUM FULL</command> will end. コマンドは現在、最終クリーンアップを実行中です。 このフェーズが完了すると、CLUSTERVACUUM FULLは終了します。

28.4.3. COPYの進捗状況のレポート #

<title>COPY Progress Reporting</title>

Whenever <command>COPY</command> is running, the <structname>pg_stat_progress_copy</structname> view will contain one row for each backend that is currently running a <command>COPY</command> command. The table below describes the information that will be reported and provides information about how to interpret it. COPYが実行されているときはいつでも、pg_stat_progress_copyビューには現在COPYコマンドを実行している各バックエンドごとの行が含まれます。 以下の表は、報告される情報を説明し、どのように解釈するかの情報を提供します。

表28.41 pg_stat_progress_copyビュー

<title><structname>pg_stat_progress_copy</structname> View</title>

Column Type 列 型

Description 説明

pid integer

Process ID of backend. バックエンドのプロセスIDです。

datid oid

OID of the database to which this backend is connected. バックエンドが接続されているデータベースのOIDです。

datname name

Name of the database to which this backend is connected. バックエンドが接続されているデータベースの名前です。

relid oid

OID of the table on which the <command>COPY</command> command is executed. It is set to <literal>0</literal> if copying from a <command>SELECT</command> query. COPYコマンドが実行されるテーブルのOIDです。 SELECT問い合わせからコピーする場合は0に設定されます。

command text

The command that is running: <literal>COPY FROM</literal>, or <literal>COPY TO</literal>. 実行しているコマンドで、 COPY FROMまたはCOPY TOです。

type text

The io type that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, <literal>PIPE</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used for example during the initial table synchronization in logical replication). データの読み取りまたは書き込みが行われる入出力の種類で、 FILEPROGRAMPIPECOPY FROM STDINおよびCOPY TO STDOUT用)、 またはCALLBACK(たとえば、論理レプリケーションの初期テーブル同期中に使用されます)です。

bytes_processed bigint

Number of bytes already processed by <command>COPY</command> command. COPYコマンドで既に処理されたバイト数です。

bytes_total bigint

Size of source file for <command>COPY FROM</command> command in bytes. It is set to <literal>0</literal> if not available. COPY FROMコマンドのコピー元ファイルのバイト数でのサイズです。 利用できない場合は0に設定されます。

tuples_processed bigint

Number of tuples already processed by <command>COPY</command> command. COPYコマンドで既に処理されたタプル数です。

tuples_excluded bigint

Number of tuples not processed because they were excluded by the <command>WHERE</command> clause of the <command>COPY</command> command. COPYコマンドのWHERE句で除外されたために処理されなかったタプル数です。


28.4.4. CREATE INDEXの進捗状況のレポート #

<title>CREATE INDEX Progress Reporting</title>

Whenever <command>CREATE INDEX</command> or <command>REINDEX</command> is running, the <structname>pg_stat_progress_create_index</structname> view will contain one row for each backend that is currently creating indexes. The tables below describe the information that will be reported and provide information about how to interpret it. CREATE INDEXREINDEXが実行中であるときにはいつでも、pg_stat_progress_create_indexビューには現在インデックスを作成している各バックエンドごとに1行が含まれます。 以下の表は、報告される情報を説明し、どのように解釈するかの情報を提供します。

表28.42 pg_stat_progress_create_indexビュー

<title><structname>pg_stat_progress_create_index</structname> View</title>

Column Type 列 型

Description 説明

pid integer

Process ID of the backend creating indexes. 《機械翻訳》インデックスを作成するバックエンドのプロセスID。

datid oid

OID of the database to which this backend is connected. バックエンドが接続されているデータベースのOIDです。

datname name

Name of the database to which this backend is connected. バックエンドが接続されているデータベースの名前です。

relid oid

OID of the table on which the index is being created. インデックスが作られているテーブルのOIDです。

index_relid oid

OID of the index being created or reindexed. During a non-concurrent <command>CREATE INDEX</command>, this is 0. 作成または再作成されているインデックスのOIDです。 同時作成ではないCREATE INDEXのときは、これは0です。

command text

Specific command type: <literal>CREATE INDEX</literal>, <literal>CREATE INDEX CONCURRENTLY</literal>, <literal>REINDEX</literal>, or <literal>REINDEX CONCURRENTLY</literal>. 《マッチ度[78.034682]》実行しているコマンドで、 CREATE INDEXCREATE INDEX CONCURRENTLYREINDEXまたはREINDEX CONCURRENTLYです。 《機械翻訳》特定のコマンドタイプ: CREATE INDEXCREATE INDEX CONCURRENTLYREINDEX、またはREINDEX CONCURRENTLY

phase text

Current processing phase of index creation. See <xref linkend="create-index-phases"/>. 現在処理中のインデックス作成のフェーズです。 表 28.43を参照してください。

lockers_total bigint

Total number of lockers to wait for, when applicable. 該当するときに、待機するロック取得者の総数です。

lockers_done bigint

Number of lockers already waited for. 既に待機したロック取得者の数です。

current_locker_pid bigint

Process ID of the locker currently being waited for. 現在待機しているロック取得者のプロセスIDです。

blocks_total bigint

Total number of blocks to be processed in the current phase. 現在のフェーズで処理されることになっているブロックの総数です。

blocks_done bigint

Number of blocks already processed in the current phase. 現在のフェーズで既に処理されたブロック数です。

tuples_total bigint

Total number of tuples to be processed in the current phase. 現在のフェーズで処理されることになっているタプルの総数です。

tuples_done bigint

Number of tuples already processed in the current phase. 現在のフェーズで既に処理されたタプル数です。

partitions_total bigint

Total number of partitions on which the index is to be created or attached, including both direct and indirect partitions. <literal>0</literal> during a <literal>REINDEX</literal>, or when the index is not partitioned. 《機械翻訳》直接パーティションと間接パーティションの両方を含む、インデックスが作成またはアタッチされるパーティションの総数。 0は、REINDEX中またはインデックスがパーティション化されていない場合です。

partitions_done bigint

Number of partitions on which the index has already been created or attached, including both direct and indirect partitions. <literal>0</literal> during a <literal>REINDEX</literal>, or when the index is not partitioned. 《機械翻訳》直接パーティションと間接パーティションの両方を含む、インデックスがすでに作成またはアタッチされているパーティションの数。 0は、REINDEX中またはインデックスがパーティション化されていない場合です。


表28.43 CREATE INDEXのフェーズ

<title>CREATE INDEX Phases</title>
フェーズ説明
initializing <command>CREATE INDEX</command> or <command>REINDEX</command> is preparing to create the index. This phase is expected to be very brief. CREATE INDEXREINDEXはインデックスを作る準備をしています。 このフェーズはごく短時間になると予想されます。
waiting for writers before build <command>CREATE INDEX CONCURRENTLY</command> or <command>REINDEX CONCURRENTLY</command> is waiting for transactions with write locks that can potentially see the table to finish. This phase is skipped when not in concurrent mode. Columns <structname>lockers_total</structname>, <structname>lockers_done</structname> and <structname>current_locker_pid</structname> contain the progress information for this phase. CREATE INDEX CONCURRENTLYREINDEX CONCURRENTLYは、潜在的にテーブルを参照するかもしれない書き込みロックを伴うトランザクションが終了するのを待機しています。 本フェーズは同時モードでないときには省かれます。 列lockers_totallockers_done、および、current_locker_pidには本フェーズの進行情報が入ります。
building index The index is being built by the access method-specific code. In this phase, access methods that support progress reporting fill in their own progress data, and the subphase is indicated in this column. Typically, <structname>blocks_total</structname> and <structname>blocks_done</structname> will contain progress data, as well as potentially <structname>tuples_total</structname> and <structname>tuples_done</structname>. インデックスがアクセスメソッド固有のコードにより作成されています。 本フェーズでは、進捗レポートをサポートするアクセスメソッドが自身の進捗データを記入し、また、サブフェーズはこの列で示されます。 典型的には、blocks_totalblocks_doneが、さらにあるいはtuples_totaltuples_doneも、進捗データを含みます。
waiting for writers before validation <command>CREATE INDEX CONCURRENTLY</command> or <command>REINDEX CONCURRENTLY</command> is waiting for transactions with write locks that can potentially write into the table to finish. This phase is skipped when not in concurrent mode. Columns <structname>lockers_total</structname>, <structname>lockers_done</structname> and <structname>current_locker_pid</structname> contain the progress information for this phase. CREATE INDEX CONCURRENTLYREINDEX CONCURRENTLYは、潜在的にテーブルに書き込みするかもしれない書き込みロックを伴うトランザクションが終了するのを待機しています。 本フェーズは同時モードでないときには省かれます。 列lockers_totallockers_done、および、current_locker_pidには本フェーズの進行情報が入ります。
index validation: scanning index <command>CREATE INDEX CONCURRENTLY</command> is scanning the index searching for tuples that need to be validated. This phase is skipped when not in concurrent mode. Columns <structname>blocks_total</structname> (set to the total size of the index) and <structname>blocks_done</structname> contain the progress information for this phase. CREATE INDEX CONCURRENTLYは確認が必要なタプルに対するインデックス検索をスキャンしています。 本フェーズは同時モードでないときには省かれます。 列blocks_total(インデックスの総サイズが設定される)とblocks_doneに本フェーズの進行情報が入ります。
index validation: sorting tuples <command>CREATE INDEX CONCURRENTLY</command> is sorting the output of the index scanning phase. CREATE INDEX CONCURRENTLYはインデックスをスキャンするフェーズ(scanning index)の出力をソートしています。
index validation: scanning table <command>CREATE INDEX CONCURRENTLY</command> is scanning the table to validate the index tuples collected in the previous two phases. This phase is skipped when not in concurrent mode. Columns <structname>blocks_total</structname> (set to the total size of the table) and <structname>blocks_done</structname> contain the progress information for this phase. CREATE INDEX CONCURRENTLYは、前の2フェーズで収集されたインデックスのタプルを確認するためテーブルをスキャンしています。 本フェーズは同時モードでないときには省かれます。 列blocks_total(テーブルの総サイズが設定される)とblocks_doneに本フェーズの進行情報が入ります。
waiting for old snapshots <command>CREATE INDEX CONCURRENTLY</command> or <command>REINDEX CONCURRENTLY</command> is waiting for transactions that can potentially see the table to release their snapshots. This phase is skipped when not in concurrent mode. Columns <structname>lockers_total</structname>, <structname>lockers_done</structname> and <structname>current_locker_pid</structname> contain the progress information for this phase. CREATE INDEX CONCURRENTLYREINDEX CONCURRENTLYは、潜在的にテーブルを参照するかもしれないトランザクションがそれらのスナップショットを解放するのを待機しています。 本フェーズは同時モードでないときには省かれます。 列lockers_totallockers_done、および、current_locker_pidには本フェーズの進行情報が入ります。
waiting for readers before marking dead <command>REINDEX CONCURRENTLY</command> is waiting for transactions with read locks on the table to finish, before marking the old index dead. This phase is skipped when not in concurrent mode. Columns <structname>lockers_total</structname>, <structname>lockers_done</structname> and <structname>current_locker_pid</structname> contain the progress information for this phase. REINDEX CONCURRENTLYは、古いインデックスに無効と印付けする前に、テーブルへの読み取りロックを伴うトランザクションが終了するのを待機しています。 本フェーズは同時モードでないときには省かれます。 列lockers_totallockers_done、および、current_locker_pidには本フェーズの進行情報が入ります。
waiting for readers before dropping <command>REINDEX CONCURRENTLY</command> is waiting for transactions with read locks on the table to finish, before dropping the old index. This phase is skipped when not in concurrent mode. Columns <structname>lockers_total</structname>, <structname>lockers_done</structname> and <structname>current_locker_pid</structname> contain the progress information for this phase. REINDEX CONCURRENTLYは、古いインデックスを削除する前に、テーブルへの読み取りロックを伴うトランザクションが終了するのを待機しています。 本フェーズは同時モードでないときには省かれます。 列lockers_totallockers_done、および、current_locker_pidには本フェーズの進行情報が入ります。

28.4.5. VACUUMの進捗状況のレポート #

<title>VACUUM Progress Reporting</title>

Whenever <command>VACUUM</command> is running, the <structname>pg_stat_progress_vacuum</structname> view will contain one row for each backend (including autovacuum worker processes) that is currently vacuuming. The tables below describe the information that will be reported and provide information about how to interpret it. Progress for <command>VACUUM FULL</command> commands is reported via <structname>pg_stat_progress_cluster</structname> because both <command>VACUUM FULL</command> and <command>CLUSTER</command> rewrite the table, while regular <command>VACUUM</command> only modifies it in place. See <xref linkend="cluster-progress-reporting"/>. 《マッチ度[94.969512]》VACUUMを実行するときはいつでも、pg_stat_progress_vacuumビューは、現在バキューム処理している(自動バキュームワーカープロセスを含む)それぞれのバックエンドごとに1行含まれます。 以下の表は、報告される情報を説明し、どのように解釈するかの情報を提供します。 VACUUM FULLコマンドの進捗はpg_stat_progress_clusterでレポートされます。これは、通常のVACUUMはテーブル内を書き換えするのみである一方、VACUUM FULLCLUSTERはいずれもテーブルを再作成するためです。 28.4.2を参照してください。

表28.44 pg_stat_progress_vacuumビュー

<title><structname>pg_stat_progress_vacuum</structname> View</title>

Column Type 列 型

Description 説明

pid integer

Process ID of backend. バックエンドのプロセスIDです。

datid oid

OID of the database to which this backend is connected. バックエンドが接続されているデータベースのOIDです。

datname name

Name of the database to which this backend is connected. バックエンドが接続されているデータベース名です。

relid oid

OID of the table being vacuumed. バキューム処理が行われているテーブルのOIDです。

phase text

Current processing phase of vacuum. See <xref linkend="vacuum-phases"/>. 現在処理しているバキュームのフェーズです。 表 28.45を参照してください。

heap_blks_total bigint

Total number of heap blocks in the table. This number is reported as of the beginning of the scan; blocks added later will not be (and need not be) visited by this <command>VACUUM</command>. テーブルのヒープブロックの総数です。 この数字は、スキャンの開始を基点としてレポートされます。 後に追加されるブロックは、このVACUUMによって処理されません(必要もありません)。

heap_blks_scanned bigint

Number of heap blocks scanned. Because the <link linkend="storage-vm">visibility map</link> is used to optimize scans, some blocks will be skipped without inspection; skipped blocks are included in this total, so that this number will eventually become equal to <structfield>heap_blks_total</structfield> when the vacuum is complete. This counter only advances when the phase is <literal>scanning heap</literal>. スキャンされたヒープブロックの数です。 可視性マップがスキャンを最適化するために使用されるため、いくつかのブロックが検査されずに読み飛ばされます。 読み飛ばされたブロックはこの総数に含まれ、そのためこの数字はバキューム処理が完了した時に、最終的にheap_blks_totalと同じになります。 このカウンタは、フェーズがscanning heapの時にのみ増加します。

heap_blks_vacuumed bigint

Number of heap blocks vacuumed. Unless the table has no indexes, this counter only advances when the phase is <literal>vacuuming heap</literal>. Blocks that contain no dead tuples are skipped, so the counter may sometimes skip forward in large increments. バキューム処理されたヒープブロックの数です。 テーブルにインデックスが1つでも存在するなら、このカウンタはフェーズがvacuuming heapの時にのみ増加します。 無効なタプルが含まれていないブロックは読み飛ばされ、それゆえカウンタは時々大きな増加量で早送りされます。

index_vacuum_count bigint

Number of completed index vacuum cycles. 完了したインデックスバキュームサイクルの数です。

max_dead_tuples bigint

Number of dead tuples that we can store before needing to perform an index vacuum cycle, based on <xref linkend="guc-maintenance-work-mem"/>. インデックスバキュームサイクルの実行に必要となる前に格納できる、maintenance_work_memに基づいた、無効なタプルの数です。

num_dead_tuples bigint

Number of dead tuples collected since the last index vacuum cycle. 最後のインデックスバキュームサイクルから収集された無効タプルの数です。


表28.45 VACUUMのフェーズ

<title>VACUUM Phases</title>
フェーズ説明
initializing <command>VACUUM</command> is preparing to begin scanning the heap. This phase is expected to be very brief. VACUUMは、ヒープをスキャンし始める準備をしています。 このフェーズは、非常に短時間であると予想されます。
scanning heap <command>VACUUM</command> is currently scanning the heap. It will prune and defragment each page if required, and possibly perform freezing activity. The <structfield>heap_blks_scanned</structfield> column can be used to monitor the progress of the scan. VACUUMは、現在ヒープをスキャン中です。 必要であればそれぞれのページを切り取り、デフラグし、場合によってはフリーズ活動を実行します。 スキャンの進捗状況の監視にheap_blks_scanned列が使用できます。
vacuuming indexes <command>VACUUM</command> is currently vacuuming the indexes. If a table has any indexes, this will happen at least once per vacuum, after the heap has been completely scanned. It may happen multiple times per vacuum if <xref linkend="guc-maintenance-work-mem"/> (or, in the case of autovacuum, <xref linkend="guc-autovacuum-work-mem"/> if set) is insufficient to store the number of dead tuples found. VACUUMは、現在インデックスをバキューム処理中です。 テーブルにインデックスが存在する場合、ヒープが完全にスキャンされた後に、バキューム実行ごとに少なくとも1回発生します。 maintenance_work_memが、発見された無効タプルの数量を格納するのに不十分な場合(または、自動バキュームの場合はautovacuum_work_memが設定されている場合)は、バキューム実行ごとに複数回発生する可能性があります。
vacuuming heap <command>VACUUM</command> is currently vacuuming the heap. Vacuuming the heap is distinct from scanning the heap, and occurs after each instance of vacuuming indexes. If <structfield>heap_blks_scanned</structfield> is less than <structfield>heap_blks_total</structfield>, the system will return to scanning the heap after this phase is completed; otherwise, it will begin cleaning up indexes after this phase is completed. VACUUMは、現在ヒープをバキューム処理中です。 ヒープのバキュームは、ヒープのスキャンと異なり、インデックスをバキューム処理するそれぞれのインスタンスの後に発生します。 heap_blks_scannedheap_blks_totalより少ない場合、システムはこのフェーズの完了後にヒープのスキャン処理に戻ります。 さもなければ、このフェーズの完了後にインデックスの整理を始めます。
cleaning up indexes <command>VACUUM</command> is currently cleaning up indexes. This occurs after the heap has been completely scanned and all vacuuming of the indexes and the heap has been completed. VACUUMは、現在インデックスの整理処理中です。 これは、ヒープが完全にスキャンされ、インデックスとヒープが完全にすべてバキューム処理された後に発生します。
truncating heap <command>VACUUM</command> is currently truncating the heap so as to return empty pages at the end of the relation to the operating system. This occurs after cleaning up indexes. VACUUMは、現在リレーションの終点の空のページをオペレーティングシステムに戻すためにヒープを切り詰めています。 これは、インデックスの整理処理後に発生します。
performing final cleanup <command>VACUUM</command> is performing final cleanup. During this phase, <command>VACUUM</command> will vacuum the free space map, update statistics in <literal>pg_class</literal>, and report statistics to the cumulative statistics system. When this phase is completed, <command>VACUUM</command> will end. VACUUMは最終クリーンアップを実行しています。 このフェーズ中に、VACUUMは空き領域マップをバキュームし、pg_class内の統計を更新し、累積統計システムに統計を報告します。 このフェーズが完了すると、VACUUMは終了します。

28.4.6. ベースバックアップの進捗状況のレポート #

<title>Base Backup Progress Reporting</title>

Whenever an application like <application>pg_basebackup</application> is taking a base backup, the <structname>pg_stat_progress_basebackup</structname> view will contain a row for each WAL sender process that is currently running the <command>BASE_BACKUP</command> replication command and streaming the backup. The tables below describe the information that will be reported and provide information about how to interpret it. pg_basebackupのようなアプリケーションがベースバックアップを取る時はいつでも、pg_stat_progress_basebackupビューには現在BASE_BACKUPレプリケーションコマンドを実行し、バックアップをストリームしている各WAL送信プロセスごとの行が含まれます。 以下の表は、報告される情報を説明し、どのように解釈するかの情報を提供します。

表28.46 pg_stat_progress_basebackupビュー

<title><structname>pg_stat_progress_basebackup</structname> View</title>

Column Type 列 型

Description 説明

pid integer

Process ID of a WAL sender process. WAL送信プロセスのプロセスIDです。

phase text

Current processing phase. See <xref linkend="basebackup-phases"/>. 現在処理中のフェーズです。 表 28.47を参照してください。

backup_total bigint

Total amount of data that will be streamed. This is estimated and reported as of the beginning of <literal>streaming database files</literal> phase. Note that this is only an approximation since the database may change during <literal>streaming database files</literal> phase and WAL log may be included in the backup later. This is always the same value as <structfield>backup_streamed</structfield> once the amount of data streamed exceeds the estimated total size. If the estimation is disabled in <application>pg_basebackup</application> (i.e., <literal>&#45;-no-estimate-size</literal> option is specified), this is <literal>NULL</literal>. ストリームされるデータの総量です。 これは推定され、streaming database filesフェーズの最初に報告されます。 データベースはstreaming database filesフェーズの間に変化するかもしれませんし、WALログが後ほどバックアップに含められますので、これは近似でしかないことに注意してください。 ストリームされたデータ量が推定された総量を超えたら、これは常にbackup_streamedと同じ値です。 pg_basebackupで推定が無効にされて(すなわち、--no-estimate-sizeオプションが指定されて)いれば、NULLです。

backup_streamed bigint

Amount of data streamed. This counter only advances when the phase is <literal>streaming database files</literal> or <literal>transferring wal files</literal>. ストリームされるデータの量です。 このカウンタはフェーズがstreaming database filesまたはtransferring wal filesの時にのみ増加します。

tablespaces_total bigint

Total number of tablespaces that will be streamed. ストリームされるテーブル空間の総数です。

tablespaces_streamed bigint

Number of tablespaces streamed. This counter only advances when the phase is <literal>streaming database files</literal>. ストリームされたテーブル空間の数です。 このカウンタはフェーズがstreaming database filesの時にのみ増加します。


表28.47 ベースバックアップのフェーズ

<title>Base Backup Phases</title>
フェーズ説明
initializing The WAL sender process is preparing to begin the backup. This phase is expected to be very brief. WAL送信プロセスはバックアップを開始する準備をしています。 このフェーズはごく短時間になると予想されます。
waiting for checkpoint to finish The WAL sender process is currently performing <function>pg_backup_start</function> to prepare to take a base backup, and waiting for the start-of-backup checkpoint to finish. WAL送信プロセスは、ベースバックアップを取る準備をするために現在pg_backup_startを実行し、バックアップ開始チェックポイントが完了するのを待っています。
estimating backup size The WAL sender process is currently estimating the total amount of database files that will be streamed as a base backup. WAL送信プロセスは、ベースバックアップとしてストリームされるデータベースファイルの総量を現在推定しています。
streaming database files The WAL sender process is currently streaming database files as a base backup. WAL送信プロセスはデータベースファイルをベースバックアップとして現在ストリームしています。
waiting for wal archiving to finish The WAL sender process is currently performing <function>pg_backup_stop</function> to finish the backup, and waiting for all the WAL files required for the base backup to be successfully archived. If either <literal>&#45;-wal-method=none</literal> or <literal>&#45;-wal-method=stream</literal> is specified in <application>pg_basebackup</application>, the backup will end when this phase is completed. WAL送信プロセスは現在pg_backup_stopを実行してバックアップを終了しており、ベースバックアップに必要なすべてのWALファイルが正常にアーカイブされるのを待機しています。 pg_basebackup--wal-method=noneまたは--wal-method=streamが指定された場合、バックアップはこのフェーズが完了した時点で終了します。
transferring wal files The WAL sender process is currently transferring all WAL logs generated during the backup. This phase occurs after <literal>waiting for wal archiving to finish</literal> phase if <literal>&#45;-wal-method=fetch</literal> is specified in <application>pg_basebackup</application>. The backup will end when this phase is completed. WAL送信プロセスはバックアップ中に生成されたWALログをすべて現在転送しています。 pg_basebackup--wal-method=fetchが指定されていれば、このフェーズがwaiting for wal archiving to finishの次に来ます。 バックアップはこのフェーズが完了したら終了します。