> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-parallel-read-in-order-multi-part.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# s3_upload_* セッション設定

> s3_upload_* の生成グループに属する 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](/ja/reference/system-tables/settings) で参照でき、[source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp) から自動生成されています。

## s3\_upload\_checksum\_algorithm

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.9"},{"label": ""},{"label": "S3 へのアップロードに使用するチェックサムアルゴリズムを選択する新しい設定。"}]}]} />

ClickHouse がデータを `S3` にアップロードするときに使用するチェックサムアルゴリズムです。`CRC32` と `SHA256` は柔軟な `x-amz-checksum-*` ヘッダーとして送信され、`MD5` は `Content-MD5` ヘッダーとして送信されます。

デフォルトでは値は空であり、ClickHouse は AWS SDK に `Content-MD5` を計算させます。FIPS モードでは `MD5` を使用できないため、SDK はこれを暗黙的に省略し、アップロードにはチェックサムがまったく付与されません。代わりに柔軟なチェックサムを付与するには、`CRC32` または `SHA256` を設定してください。この設定が適用される場合、明示的に指定した `MD5` は拒否されます。

この設定は `S3` クライアントの作成時に反映されるため、`s3` テーブル関数や `BACKUP ... TO S3` など、クエリスコープでの使用に適用されます。後からクエリ単位で `SET` を実行しても、`S3` ディスクのような、すでに作成された長期間存続するクライアントは再構成されません。

`S3Express` バケットでは柔軟なチェックサムが必須であり、`Content-MD5` は受け付けられません。明示的に指定した `CRC32` または `SHA256` は使用され、値が空の場合は `CRC32` が使用され、明示的に指定した `MD5` は拒否されます。

`GCS` エンドポイント (`storage.googleapis.com`) はこの設定を完全に無視し、SDK の `Content-MD5` の動作を維持します。これは、`GCS` が AWS の `x-amz-checksum-*` ヘッダーを含む `SigV4` 署名付きリクエストを拒否するためです。

サーバー側コピーでは、この設定は無視されます。

## s3\_upload\_part\_size\_multiply\_factor

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

S3 への 1 回の書き込みで s3\_multiply\_parts\_count\_threshold 個のパーツがアップロードされるたびに、s3\_min\_upload\_part\_size にこの係数を掛けます。

## s3\_upload\_part\_size\_multiply\_parts\_count\_threshold

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

S3 にこの数のパーツがアップロードされるたびに、s3\_min\_upload\_part\_size に s3\_upload\_part\_size\_multiply\_factor が乗算されます。
