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

> System table containing information about tasks from replication queues stored in ClickHouse Keeper, or ZooKeeper, for tables in the `ReplicatedMergeTree` family.

# system.replication_queue

<h2 id="description">
  Description
</h2>

Contains information about tasks from replication queues stored in ClickHouse Keeper, or ZooKeeper, for tables in the `ReplicatedMergeTree` family.

<h2 id="columns">
  Columns
</h2>

* `database` ([String](/reference/data-types/index)) — Name of the database.
* `table` ([String](/reference/data-types/index)) — Name of the table.
* `replica_name` ([String](/reference/data-types/index)) — Replica name in ClickHouse Keeper. Different replicas of the same table have different names.
* `position` ([UInt32](/reference/data-types/index)) — Position of the task in the queue.
* `node_name` ([String](/reference/data-types/index)) — Node name in ClickHouse Keeper.
* `type` ([String](/reference/data-types/index)) — Type of the task in the queue, one of: • GET\_PART — Get the part from another replica, • ATTACH\_PART — Attach the part, possibly from our own replica (if found in the detached folder). You may think of it as a GET\_PART with some optimizations as they're nearly identical, • MERGE\_PARTS — Merge the parts, • DROP\_RANGE — Delete the parts in the specified partition in the specified number range. • CLEAR\_COLUMN — NOTE: Deprecated. Drop specific column from specified partition. • CLEAR\_INDEX — NOTE: Deprecated. Drop specific index from specified partition. • REPLACE\_RANGE — Drop a certain range of parts and replace them with new ones. • MUTATE\_PART — Apply one or several mutations to the part. • ALTER\_METADATA — Apply alter modification according to global /metadata and /columns paths.
* `create_time` ([DateTime](/reference/data-types/index)) — Date and time when the task was submitted for execution.
* `required_quorum` ([UInt32](/reference/data-types/index)) — The number of replicas waiting for the task to complete with confirmation of completion. This column is only relevant for the GET\_PARTS task.
* `source_replica` ([String](/reference/data-types/index)) — Name of the source replica.
* `new_part_name` ([String](/reference/data-types/index)) — Name of the new part.
* `parts_to_merge` ([Array(String)](/reference/data-types/index)) — Names of parts to merge or update.
* `is_detach` ([UInt8](/reference/data-types/index)) — The flag indicates whether the DETACH\_PARTS task is in the queue.
* `is_currently_executing` ([UInt8](/reference/data-types/index)) — The flag indicates whether a specific task is being performed right now.
* `num_tries` ([UInt32](/reference/data-types/index)) — The number of failed attempts to complete the task.
* `last_exception` ([String](/reference/data-types/index)) — Text message about the last error that occurred (if any).
* `last_exception_time` ([DateTime](/reference/data-types/index)) — Date and time when the last error occurred.
* `last_attempt_time` ([DateTime](/reference/data-types/index)) — Date and time when the task was last attempted.
* `num_postponed` ([UInt32](/reference/data-types/index)) — The number of times the action was postponed.
* `postpone_reason` ([String](/reference/data-types/index)) — The reason why the task was postponed.
* `last_postpone_time` ([DateTime](/reference/data-types/index)) — Date and time when the task was last postponed.
* `merge_type` ([String](/reference/data-types/index)) — Type of the current merge. Empty if it's a mutation.

<h2 id="example">
  Example
</h2>

```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
```

<h2 id="see-also">
  See Also
</h2>

* [Managing ReplicatedMergeTree Tables](/reference/statements/system#managing-replicatedmergetree-tables)
