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

# detach_* MergeTree 表设置

> ClickHouse 在 detach_* 自动生成分组中的 MergeTree 表设置。

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
  }}>类型</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>默认值</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          无需重启即可更改
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

这些设置可在 [system.merge\_tree\_settings](/docs/zh/reference/system-tables/merge_tree_settings) 中查看，由 ClickHouse 源代码自动生成。

<div id="detach_not_byte_identical_parts">
  ## detach\_not\_byte\_identical\_parts
</div>

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

启用或禁用以下行为：在执行合并或变更后，如果某个副本上的 parts 与其他副本上的 parts 在字节级别上不完全一致，则将其分离。
如果禁用，则会移除该 parts。如果你希望稍后分析这类 parts，请启用此设置。

该设置适用于已启用
[数据复制](/docs/zh/reference/engines/table-engines/mergetree-family/replacingmergetree)的 `MergeTree` 表。

可能的值：

* `0` — parts 会被移除。
* `1` — parts 会被分离。

<div id="detach_old_local_parts_when_cloning_replica">
  ## detach\_old\_local\_parts\_when\_cloning\_replica
</div>

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

修复丢失的副本时，不移除旧的本地 parts。

可能的值：

* `true`
* `false`
