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

# alter_* session settings

> ClickHouse session settings in the alter_* generated group.

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.settings](/docs/reference/system-tables/settings) and are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

<h2 id="alter_move_to_space_execute_async">
  alter\_move\_to\_space\_execute\_async
</h2>

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

Execute ALTER TABLE MOVE ... TO \[DISK|VOLUME] asynchronously

<h2 id="alter_partition_verbose_result">
  alter\_partition\_verbose\_result
</h2>

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

Enables or disables the display of information about the parts to which the manipulation operations with partitions and parts have been successfully applied.
Applicable to [ATTACH PARTITION|PART](/docs/reference/statements/alter/partition#attach-partitionpart) and to [FREEZE PARTITION](/docs/reference/statements/alter/partition#freeze-partition).

Possible values:

* 0 — disable verbosity.
* 1 — enable verbosity.

**Example**

```sql theme={null}
CREATE TABLE test(a Int64, d Date, s String) ENGINE = MergeTree PARTITION BY toYYYYMDECLARE(d) ORDER BY a;
INSERT INTO test VALUES(1, '2021-01-01', '');
INSERT INTO test VALUES(1, '2021-01-01', '');
ALTER TABLE test DETACH PARTITION ID '202101';

ALTER TABLE test ATTACH PARTITION ID '202101' SETTINGS alter_partition_verbose_result = 1;

┌─command_type─────┬─partition_id─┬─part_name────┬─old_part_name─┐
│ ATTACH PARTITION │ 202101       │ 202101_7_7_0 │ 202101_5_5_0  │
│ ATTACH PARTITION │ 202101       │ 202101_8_8_0 │ 202101_6_6_0  │
└──────────────────┴──────────────┴──────────────┴───────────────┘

ALTER TABLE test FREEZE SETTINGS alter_partition_verbose_result = 1;

┌─command_type─┬─partition_id─┬─part_name────┬─backup_name─┬─backup_path───────────────────┬─part_backup_path────────────────────────────────────────────┐
│ FREEZE ALL   │ 202101       │ 202101_7_7_0 │ 8           │ /var/lib/clickhouse/shadow/8/ │ /var/lib/clickhouse/shadow/8/data/default/test/202101_7_7_0 │
│ FREEZE ALL   │ 202101       │ 202101_8_8_0 │ 8           │ /var/lib/clickhouse/shadow/8/ │ /var/lib/clickhouse/shadow/8/data/default/test/202101_8_8_0 │
└──────────────┴──────────────┴──────────────┴─────────────┴───────────────────────────────┴─────────────────────────────────────────────────────────────┘
```

<h2 id="alter_sync">
  alter\_sync
</h2>

**Aliases**: `replication_alter_partitions_sync`

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

Allows you to specify the wait behavior for actions that are to be executed on replicas by [`ALTER`](/docs/reference/statements/alter/index), [`OPTIMIZE`](/docs/reference/statements/optimize) or [`TRUNCATE`](/docs/reference/statements/truncate) queries.

Possible values:

* `0` — Do not wait.
* `1` — Wait for own execution.
* `2` — Wait for everyone.
* `3` - Only wait for active replicas.

Cloud default value: `0`.

<Note>
  `alter_sync` is applicable to `Replicated` and `SharedMergeTree` tables only, it does nothing to alter non `Replicated` or `Shared` tables.
</Note>

<h2 id="alter_update_mode">
  alter\_update\_mode
</h2>

<SettingsInfoBlock type="AlterUpdateMode" default_value="heavy" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.5"},{"label": "heavy"},{"label": "A new setting"}]}]} />

A mode for `ALTER` queries that have the `UPDATE` commands.

Possible values:

* `heavy` - run regular mutation.
* `lightweight` - run lightweight update if possible, run regular mutation otherwise.
* `lightweight_force` - run lightweight update if possible, throw otherwise.
