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

# lightweight_* session settings

> ClickHouse session settings in the lightweight_* generated group.

These settings are available in [system.settings](https://clickhouse.com/docs/reference/system-tables/settings.md) and are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

## lightweight\_delete\_mode

Type

LightweightDeleteMode

Default

alter\_update

A mode of internal update query that is executed as a part of lightweight delete.

Possible values:

* `alter_update` - run `ALTER UPDATE` query that creates a heavyweight mutation.
* `lightweight_update` - run lightweight update if possible, run `ALTER UPDATE` otherwise.
* `lightweight_update_force` - run lightweight update if possible, throw otherwise.

For `DELETE FROM ... ON CLUSTER`, each executing host derives the mode from its own settings, so
hosts whose profiles set different defaults can run the delete in different modes. A replicated
shard executes on one replica, so there it is that replica's settings that decide. Setting it in
the session of the initiating query overrides this, because the distributed DDL entry carries
session changes at `distributed_ddl_entry_format_version` 2 and above, which the default satisfies.
A host that constrains the setting clamps the value back.

## lightweight\_deletes\_sync

Type

UInt64

Default

2

The same as [`mutations_sync`](https://clickhouse.com/docs/reference/settings/session-settings/mutations#mutations_sync), but controls only execution of lightweight deletes.

Possible values:

| Value | Description |
| - | - |
| `0` | Mutations execute asynchronously. |
| `1` | The query waits for the lightweight deletes to complete on the current server. |
| `2` | The query waits for the lightweight deletes to complete on all replicas (if they exist). |
| `3` | The query waits only for the active replicas. Inactive replicas apply the lightweight deletes when they become active. |

**See Also**

* [Synchronicity of ALTER Queries](https://clickhouse.com/docs/reference/statements/alter/index.md#synchronicity-of-alter-queries)
* [Mutations](https://clickhouse.com/docs/reference/statements/alter/index.md#mutations)

Cloud default value: `1`.
