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

# min_free_* MergeTree 表设置

> ClickHouse 中 min_free_* 分组下的 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="min_free_disk_bytes_to_perform_insert">
  ## min\_free\_disk\_bytes\_to\_perform\_insert
</div>

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

执行插入数据前，磁盘空间应保留的最小空闲字节数。如果可用空闲字节数小于
`min_free_disk_bytes_to_perform_insert`，则会抛出异常，并且
不会执行插入。请注意，此设置：

* 会将 `keep_free_space_bytes` 设置考虑在内。
* 不会将 `INSERT` 操作即将写入的数据量考虑在内。
* 仅在指定了正数 (非零) 字节数时才会进行检查

可能的值：

* 任意正整数。

<Note>
  如果同时指定了 `min_free_disk_bytes_to_perform_insert` 和 `min_free_disk_ratio_to_perform_insert`，
  ClickHouse 会采用允许在更大空闲空间下执行
  插入的那个值。
</Note>

<div id="min_free_disk_ratio_to_perform_insert">
  ## min\_free\_disk\_ratio\_to\_perform\_insert
</div>

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

执行 `INSERT` 所需的最小可用磁盘空间与总磁盘空间比率。该值必须是
介于 0 和 1 之间的浮点值。请注意，此设置：

* 会将 `keep_free_space_bytes` 设置考虑在内。
* 不会将 `INSERT` 操作将要写入的数据量考虑在内。
* 仅在指定了正数 (非零) 比率时才会进行检查

Possible values:

* Float，0.0 - 1.0

请注意，如果同时指定了 `min_free_disk_ratio_to_perform_insert` 和
`min_free_disk_bytes_to_perform_insert`，ClickHouse 将采用能够在更多可用
磁盘空间下执行插入操作的那个值。
