> ## 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.

# always_fetch_* MergeTree table settings

> ClickHouse MergeTree table settings in the always_fetch_* generated group.

export const VersionHistory = ({rows = []}) => {
  if (rows.length === 0) {
    return null;
  }
  const headers = ["Version", "Default value", "Comment"];
  const border = "1px solid rgba(128, 128, 128, 0.3)";
  const cell = {
    border,
    padding: "0.25rem 0.5rem",
    textAlign: "start",
    verticalAlign: "top"
  };
  return <details className="not-prose" style={{
    border,
    borderRadius: "0.5rem",
    margin: "0.5rem 0",
    padding: "0.5rem 0.75rem",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <summary style={{
    cursor: "pointer",
    fontWeight: 600,
    opacity: 0.72
  }}>
        Version history
      </summary>
      <table style={{
    borderCollapse: "collapse",
    width: "100%",
    margin: "0.5rem 0 0"
  }}>
        <thead>
          <tr>
            {headers.map(header => <th key={header} style={{
    ...cell,
    fontWeight: 600,
    opacity: 0.72
  }}>
                {header}
              </th>)}
          </tr>
        </thead>
        <tbody>
          {rows.map((row, row_index) => <tr key={row.id ?? row_index}>
              {(row.items ?? []).map((item, item_index) => <td key={item_index} style={{
    ...cell,
    overflowWrap: "anywhere"
  }}>
                  {item?.label}
                </td>)}
            </tr>)}
        </tbody>
      </table>
    </details>;
};

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.merge\_tree\_settings](/docs/reference/system-tables/merge_tree_settings) and are autogenerated from ClickHouse source.

<h2 id="always_fetch_merged_part">
  always\_fetch\_merged\_part
</h2>

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

If true, this replica never merges parts and always downloads merged parts
from other replicas.

Possible values:

* true, false

<h2 id="always_fetch_mutated_part">
  always\_fetch\_mutated\_part
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.8"},{"label": "0"},{"label": "New setting to make a replica fetch mutated parts instead of executing mutations locally"}]}]} />

If true, this replica never executes `MUTATE_PART` replication log entries
(regular mutations such as `ALTER TABLE ... UPDATE/DELETE`) and always
downloads the resulting mutated parts from other replicas.

At least one replica must have this setting disabled; otherwise mutations
cannot finish.

This setting does not affect patch parts created by lightweight updates:
they are still applied locally when parts are merged. Enable
`always_fetch_merged_part` as well to also offload merges (including the
application of patch parts) to other replicas.

Because this replica does not execute mutations, and mutation failure
status is local to each replica, a synchronous wait on this replica
cannot observe mutation failures that happen on the replicas executing
the mutation. Therefore synchronous mutations (`mutations_sync` = 1
or 2) and synchronous `ALTER` queries that mutate data
(`alter_sync` = 1 or 2) are rejected on such a replica with a
`SUPPORT_IS_DISABLED` error instead of a wait that would hang if the
mutation fails. Use `mutations_sync` = 0 (`alter_sync` = 0), or issue
these queries on a replica that executes mutations.

Possible values:

* true, false
