> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# insert_quorum_* session settings

> ClickHouse session settings in the insert_quorum_* generated group.

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>Type</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>Default</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          Changeable without restart
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

These settings are available in [system.settings](/docs/reference/system-tables/settings) and are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

<h2 id="insert_quorum">
  insert\_quorum
</h2>

<SettingsInfoBlock type="UInt64Auto" default_value="0" />

<Note>
  This setting is not applicable to SharedMergeTree, see [SharedMergeTree consistency](/docs/products/cloud/features/infrastructure/shared-merge-tree#consistency) for more information.
</Note>

Enables the quorum writes.

* If `insert_quorum < 2`, the quorum writes are disabled.
* If `insert_quorum >= 2`, the quorum writes are enabled.
* If `insert_quorum = 'auto'`, use majority number (`number_of_replicas / 2 + 1`) as quorum number.

Quorum writes

`INSERT` succeeds only when ClickHouse manages to correctly write data to the `insert_quorum` of replicas during the `insert_quorum_timeout`. If for any reason the number of replicas with successful writes does not reach the `insert_quorum`, the write is considered failed and ClickHouse will delete the inserted block from all the replicas where data has already been written.

When `insert_quorum_parallel` is disabled, all replicas in the quorum are consistent, i.e. they contain data from all previous `INSERT` queries (the `INSERT` sequence is linearized). When reading data written using `insert_quorum` and `insert_quorum_parallel` is disabled, you can turn on sequential consistency for `SELECT` queries using [select\_sequential\_consistency](/docs/reference/settings/session-settings/other#select_sequential_consistency).

ClickHouse generates an exception:

* If the number of available replicas at the time of the query is less than the `insert_quorum`.
* When `insert_quorum_parallel` is disabled and an attempt to write data is made when the previous block has not yet been inserted in `insert_quorum` of replicas. This situation may occur if the user tries to perform another `INSERT` query to the same table before the previous one with `insert_quorum` is completed.

See also:

* [insert\_quorum\_timeout](/docs/reference/settings/session-settings/insert-quorum#insert_quorum_timeout)
* [insert\_quorum\_parallel](/docs/reference/settings/session-settings/insert-quorum#insert_quorum_parallel)
* [select\_sequential\_consistency](/docs/reference/settings/session-settings/other#select_sequential_consistency)

<h2 id="insert_quorum_parallel">
  insert\_quorum\_parallel
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "21.1"},{"label": "1"},{"label": "Use parallel quorum inserts by default. It is significantly more convenient to use than sequential quorum inserts"}]}]} />

<Note>
  This setting is not applicable to SharedMergeTree, see [SharedMergeTree consistency](/docs/products/cloud/features/infrastructure/shared-merge-tree#consistency) for more information.
</Note>

Enables or disables parallelism for quorum `INSERT` queries. If enabled, additional `INSERT` queries can be sent while previous queries have not yet finished. If disabled, additional writes to the same table will be rejected.

Possible values:

* 0 — Disabled.
* 1 — Enabled.

See also:

* [insert\_quorum](/docs/reference/settings/session-settings/insert-quorum#insert_quorum)
* [insert\_quorum\_timeout](/docs/reference/settings/session-settings/insert-quorum#insert_quorum_timeout)
* [select\_sequential\_consistency](/docs/reference/settings/session-settings/other#select_sequential_consistency)

<h2 id="insert_quorum_timeout">
  insert\_quorum\_timeout
</h2>

<SettingsInfoBlock type="Milliseconds" default_value="600000" />

Write to a quorum timeout in milliseconds. If the timeout has passed and no write has taken place yet, ClickHouse will generate an exception and the client must repeat the query to write the same block to the same or any other replica.

See also:

* [insert\_quorum](/docs/reference/settings/session-settings/insert-quorum#insert_quorum)
* [insert\_quorum\_parallel](/docs/reference/settings/session-settings/insert-quorum#insert_quorum_parallel)
* [select\_sequential\_consistency](/docs/reference/settings/session-settings/other#select_sequential_consistency)
