> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8a08bda2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ClickHouse Keeper または ZooKeeper に格納されている、`ReplicatedMergeTree` ファミリーのテーブルのレプリケーションキュー内のタスクに関する情報を含むシステムテーブル。

# system.replication_queue

<div id="description">
  ## 説明
</div>

`ReplicatedMergeTree` ファミリーのテーブルについて、ClickHouse Keeper または ZooKeeper に保存されているレプリケーションキュー内のタスクに関する情報が含まれます。

<div id="columns">
  ## カラム
</div>

* `database` ([String](/ja/reference/data-types)) — データベース名。
* `table` ([String](/ja/reference/data-types)) — テーブル名。
* `replica_name` ([String](/ja/reference/data-types)) — ClickHouse Keeper 内のレプリカ名。同じテーブルのレプリカには、それぞれ異なる名前が付けられます。
* `position` ([UInt32](/ja/reference/data-types)) — キュー内のタスクの位置。
* `node_name` ([String](/ja/reference/data-types)) — ClickHouse Keeper 内のノード名。
* `type` ([String](/ja/reference/data-types)) — キュー内のタスクの種類。次のいずれかです: • GET\_PART — 別のレプリカからパーツを取得します。 • ATTACH\_PART — パーツをアタッチします。必要に応じて、自身のレプリカからアタッチすることもあります (detached フォルダー内に見つかった場合) 。ほぼ同じ処理ですが一部最適化が加えられているため、GET\_PART の最適化版と考えることができます。 • MERGE\_PARTS — パーツをマージします。 • DROP\_RANGE — 指定したパーティション内の指定範囲の番号にあるパーツを削除します。 • CLEAR\_COLUMN — 注: 非推奨。指定したパーティションから特定のカラムを削除します。 • CLEAR\_INDEX — 注: 非推奨。指定したパーティションから特定の索引を削除します。 • REPLACE\_RANGE — 特定範囲のパーツを削除し、新しいパーツに置き換えます。 • MUTATE\_PART — 1 つ以上のミューテーションをパーツに適用します。 • ALTER\_METADATA — グローバルな /metadata および /columns パスに従って ALTER による変更を適用します。
* `create_time` ([DateTime](/ja/reference/data-types)) — タスクが実行のために送信された日時。
* `required_quorum` ([UInt32](/ja/reference/data-types)) — 完了確認付きでタスクの完了を待機しているレプリカ数。このカラムは GET\_PARTS タスクにのみ関連します。
* `source_replica` ([String](/ja/reference/data-types)) — ソースレプリカ名。
* `new_part_name` ([String](/ja/reference/data-types)) — 新しいパーツ名。
* `parts_to_merge` ([Array(String)](/ja/reference/data-types)) — マージまたは更新するパーツの名前。
* `is_detach` ([UInt8](/ja/reference/data-types)) — DETACH\_PARTS タスクがキュー内にあるかどうかを示すフラグ。
* `is_currently_executing` ([UInt8](/ja/reference/data-types)) — 特定のタスクが現在実行中かどうかを示すフラグ。
* `num_tries` ([UInt32](/ja/reference/data-types)) — タスクの完了に失敗した試行回数。
* `last_exception` ([String](/ja/reference/data-types)) — 最後に発生したエラーに関するテキストメッセージ (ある場合) 。
* `last_exception_time` ([DateTime](/ja/reference/data-types)) — 最後のエラーが発生した日時。
* `last_attempt_time` ([DateTime](/ja/reference/data-types)) — タスクが最後に試行された日時。
* `num_postponed` ([UInt32](/ja/reference/data-types)) — アクションが延期された回数。
* `postpone_reason` ([String](/ja/reference/data-types)) — タスクが延期された理由。
* `last_postpone_time` ([DateTime](/ja/reference/data-types)) — タスクが最後に延期された日時。
* `merge_type` ([String](/ja/reference/data-types)) — 現在のマージの種類。ミューテーションの場合は空です。

<div id="example">
  ## 例
</div>

```sql theme={null}
SELECT * FROM system.replication_queue LIMIT 1 FORMAT Vertical;
```

```text theme={null}
Row 1:
──────
database:               merge
table:                  visits_v2
replica_name:           mtgiga001-1t
position:               15
node_name:              queue-0009325559
type:                   MERGE_PARTS
create_time:            2020-12-07 14:04:21
required_quorum:        0
source_replica:         mtgiga001-1t
new_part_name:          20201130_121373_121384_2
parts_to_merge:         ['20201130_121373_121378_1','20201130_121379_121379_0','20201130_121380_121380_0','20201130_121381_121381_0','20201130_121382_121382_0','20201130_121383_121383_0','20201130_121384_121384_0']
is_detach:              0
is_currently_executing: 0
num_tries:              36
last_exception:         Code: 226, e.displayText() = DB::Exception: Marks file '/opt/clickhouse/data/merge/visits_v2/tmp_fetch_20201130_121373_121384_2/CounterID.mrk' does not exist (version 20.8.7.15 (official build))
last_attempt_time:      2020-12-08 17:35:54
num_postponed:          0
postpone_reason:
last_postpone_time:     1970-01-01 03:00:00
```

<div id="see-also">
  ## 関連項目
</div>

* [ReplicatedMergeTree テーブルの管理](/ja/reference/statements/system#managing-replicatedmergetree-tables)
