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

# compatibility_* 会话设置

> 位于 compatibility_* 生成组中的 ClickHouse 会话设置。

export const VersionHistory = ({rows = []}) => {
  if (rows.length === 0) {
    return null;
  }
  const headers = ["版本", "默认值", "注释"];
  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
  }}>
        版本历史
      </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
  }}>类型</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.settings](/zh/reference/system-tables/settings) 中查看，并由 [源代码](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp) 自动生成。

<div id="compatibility">
  ## compatibility
</div>

`compatibility` 设置会使 ClickHouse 使用先前某个 ClickHouse 版本的默认设置，而该先前版本由此设置指定。

如果某些设置已被设为非默认值，则会保留这些设置 (只有未被修改的设置才会受到 `compatibility` 设置的影响) 。

该设置接受一个以字符串表示的 ClickHouse 版本号，例如 `22.3`、`22.8`。空值表示此设置已禁用。

默认禁用。

<Note>
  在 ClickHouse Cloud 中，服务级别的默认 `compatibility` 设置必须由 ClickHouse Cloud Support 进行配置。请[提交工单](https://clickhouse.cloud/support)以完成设置。
  不过，也可以通过标准的 ClickHouse 设置机制，在用户、角色、profile、查询或 会话 级别覆盖 `compatibility` 设置，例如在 会话 中使用 `SET compatibility = '22.3'`，或在查询中使用 `SETTINGS compatibility = '22.3'`。
</Note>

<div id="compatibility_s3_presigned_url_query_in_path">
  ## compatibility\_s3\_presigned\_url\_query\_in\_path
</div>

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

兼容性设置：启用后，会将预签名 URL 的查询参数 (例如 X-Amz-\*) 并入 S3 对象键中 (旧版行为) ，
因此 '?' 会在路径中作为通配符处理。禁用时 (默认) ，预签名 URL 的查询参数会保留在 URL 查询中，
以避免将 '?' 解释为通配符。
