Server Settings

Note

A value of `0` means "never". The default value corresponds to 30 days.

## database\_replicated\_allow\_detach\_permanently[​](#database_replicated_allow_detach_permanently "Direct link to database_replicated_allow_detach_permanently")

Allow detaching tables permanently in Replicated databases

## database\_replicated\_drop\_broken\_tables[​](#database_replicated_drop_broken_tables "Direct link to database_replicated_drop_broken_tables")

Drop unexpected tables from Replicated databases instead of moving them to a separate local database

## dead\_letter\_queue[​](#dead_letter_queue "Direct link to dead_letter_queue")

Setting for the 'dead\_letter\_queue' system table.

The following settings can be configured by sub-tags:

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Setting Description Default Note|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `database` Name of the database. |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `table` Name of the system table. |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `engine` [MergeTree Engine Definition](/docs/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-creating-a-table) for a system table. Cannot be used if `partition_by` or `order_by` defined. If not specified `MergeTree` is selected by default| `partition_by` [Custom partitioning key](/docs/engines/table-engines/mergetree-family/custom-partitioning-key) for a system table. If `engine` is specified for system table, `partition_by` parameter should be specified directly inside 'engine'| `ttl` Specifies the table [TTL](/docs/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-ttl). If `engine` is specified for system table, `ttl` parameter should be specified directly inside 'engine'| `order_by` [Custom sorting key](/docs/engines/table-engines/mergetree-family/mergetree#order_by) for a system table. Can't be used if `engine` defined. If `engine` is specified for system table, `order_by` parameter should be specified directly inside 'engine'| `storage_policy` Name of the storage policy to use for the table (optional). If `engine` is specified for system table, `storage_policy` parameter should be specified directly inside 'engine'| `settings` [Additional parameters](/docs/engines/table-engines/mergetree-family/mergetree#settings) that control the behavior of the MergeTree (optional). If `engine` is specified for system table, `settings` parameter should be specified directly inside 'engine'| `flush_interval_milliseconds` Interval for flushing data from the buffer in memory to the table. `7500` |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `max_size_rows` Maximal size in lines for the logs. When the amount of non-flushed logs reaches the max\_size, logs are dumped to the disk. `1048576` |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `reserved_size_rows` Pre-allocated memory size in lines for the logs. `8192` |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | | `buffer_size_rows_flush_threshold` Threshold for amount of lines. If the threshold is reached, flushing logs to the disk is launched in background. `max_size_rows / 2` |  |  |  |  | | --- | --- | --- | --- | | `flush_on_crash` Sets whether logs should be dumped to the disk in case of a crash. `false`  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |

The default settings are:

```
<dead_letter_queue>
    <database>system</database>
    <table>dead_letter</table>
    <partition_by>toYYYYMM(event_date)</partition_by>
    <flush_interval_milliseconds>7500</flush_interval_milliseconds>
</dead_letter_queue>
```

## default\_database[​](#default_database "Direct link to default_database")

The default database name.

## default\_password\_type[​](#default_password_type "Direct link to default_password_type")

Sets the password type to be automatically set for in queries like `CREATE USER u IDENTIFIED BY 'p'`.

Accepted values are:

- `plaintext_password`
- `sha256_password`
- `double_sha1_password`
- `bcrypt_password`

```
<default_password_type>sha256_password</default_password_type>
```

## default\_profile[​](#default_profile "Direct link to default_profile")

Default settings profile. Settings profiles are located in the file specified in the setting `user_config`.

**Example**

```
<default_profile>default</default_profile>
```

## default\_replica\_name[​](#default_replica_name "Direct link to default_replica_name")

The replica name in ZooKeeper.

**Example**

```
<default_replica_name>{replica}</default_replica_name>
```

## default\_replica\_path[​](#default_replica_path "Direct link to default_replica_path")

The path to the table in ZooKeeper.

**Example**

```
<default_replica_path>/clickhouse/tables/{uuid}/{shard}</default_replica_path>
```

## default\_session\_timeout[​](#default_session_timeout "Direct link to default_session_timeout")

Default session timeout, in seconds.

```
<default_session_timeout>60</default_session_timeout>
```

## dictionaries\_config[​](#dictionaries_config "Direct link to dictionaries_config")

The path to the config file for dictionaries.

Path:

- Specify the absolute path or the path relative to the server config file.
- The path can contain wildcards \* and ?.

See also:

- "[Dictionaries](/docs/sql-reference/statements/create/dictionary)".

**Example**

```
<dictionaries_config>*_dictionary.xml</dictionaries_config>
```

## dictionaries\_lazy\_load[​](#dictionaries_lazy_load "Direct link to dictionaries_lazy_load")

Lazy loading of dictionaries.

- If `true`, then each dictionary is loaded on the first use. If the loading is failed, the function that was using the dictionary throws an exception.
- If `false`, then the server loads all dictionaries at startup.

Note

The server will wait at startup until all the dictionaries finish their loading before receiving any connections
(exception: if [`wait_dictionaries_load_at_startup`](/docs/operations/server-configuration-parameters/settings#wait_dictionaries_load_at_startup) is set to `false`).

**Example**

```
<dictionaries_lazy_load>true</dictionaries_lazy_load>
```

## dictionaries\_lib\_path[​](#dictionaries_lib_path "Direct link to dictionaries_lib_path")

The directory with dictionaries lib.

**Example**