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

# allow_* session settings

> ClickHouse session settings in the allow_* 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>;
};

export const BetaBadge = ({link, galaxyTrack, galaxyEvent}) => {
  if (link) {
    return <a href={link} target="_blank" rel="noopener noreferrer" className="betaBadge" onClick={galaxyTrack && galaxyEvent ? galaxyOnClick(galaxyEvent) : undefined}>
                <Icon />
                <span>Beta</span>
            </a>;
  }
  return <div className="betaBadge">
            <Icon />
            <span>
                Beta feature. 
                <u>
                    <a href="/docs/docs/beta-and-experimental-features#beta-features">
                        Learn more.
                    </a>
                </u>
            </span>
        </div>;
};

export const ExperimentalBadge = () => {
  return <div className="experimentalBadge">
            <div className="experimentalIcon">
            <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path strokeWidth="1.25" d="M5.5 2H10.5" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" />
                <path strokeWidth="1.25" d="M9.50015 2V6.19625L13.4283 12.7425C13.4738 12.8183 13.4985 12.9049 13.4996 12.9934C13.5008 13.0818 13.4785 13.169 13.435 13.246C13.3914 13.323 13.3283 13.3871 13.2519 13.4317C13.1755 13.4764 13.0886 13.4999 13.0002 13.5H3.00015C2.91164 13.5 2.8247 13.4766 2.74822 13.432C2.67174 13.3874 2.60847 13.3233 2.56487 13.2463C2.52126 13.1693 2.49889 13.082 2.50004 12.9935C2.50119 12.905 2.52582 12.8184 2.5714 12.7425L6.50015 6.19625V2" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" />
                <path strokeWidth="1.25" d="M4.47656 9.56754C5.30344 9.41254 6.47656 9.47942 7.99969 10.25C10.0153 11.2707 11.4216 11.0569 12.2184 10.7282" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" />
            </svg>
        </div>
            Experimental feature. <u><a href="/docs/docs/beta-and-experimental-features#experimental-features">Learn more.</a></u>
        </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="allow_aggregate_partitions_independently">
  allow\_aggregate\_partitions\_independently
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.7"},{"label": "1"},{"label": "Enable independent per-partition aggregation by default when the partition key suits the GROUP BY key. The existing runtime heuristics in `ReadFromMergeTree::requestOutputEachPartitionThroughSeparatePortForAggregation` already skip the optimization when the partition layout is unfavorable (too few partitions, too many partitions, or significantly skewed partition sizes), so enabling the setting is safe in the cases where it would otherwise be a no-op."}]}]} />

Enable independent aggregation of partitions on separate threads when partition key suits group by key. Beneficial when number of partitions close to number of cores and partitions have roughly the same size. Heuristics in `ReadFromMergeTree` automatically disable the optimization for unfavorable layouts (too few partitions, too many partitions, or significantly skewed partition sizes); see `force_aggregate_partitions_independently` to bypass those checks.

<h2 id="allow_archive_path_syntax">
  allow\_archive\_path\_syntax
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.8"},{"label": "1"},{"label": "Added new setting to allow disabling archive path syntax."}]}, {"id": "row-2","items": [{"label": "24.5"},{"label": "1"},{"label": "Added new setting to allow disabling archive path syntax."}]}]} />

File/S3 engines/table function will parse paths with '::' as `<archive> :: <file>` if the archive has correct extension.

<h2 id="allow_asynchronous_read_from_io_pool_for_merge_tree">
  allow\_asynchronous\_read\_from\_io\_pool\_for\_merge\_tree
</h2>

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

Use background I/O pool to read from MergeTree tables. This setting may increase performance for I/O bound queries

<h2 id="allow_calculating_subcolumns_sizes_for_merge_tree_reading">
  allow\_calculating\_subcolumns\_sizes\_for\_merge\_tree\_reading
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.3"},{"label": "1"},{"label": "Allow calculating subcolumns sizes for merge tree reading to improve read tasks splitting"}]}]} />

When enabled, ClickHouse will calculate the size of files required for each subcolumn reading for better task and block sizes calculation.

<h2 id="allow_changing_replica_until_first_data_packet">
  allow\_changing\_replica\_until\_first\_data\_packet
</h2>

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

If it's enabled, in hedged requests we can start new connection until receiving first data packet even if we have already made some progress
(but progress haven't updated for `receive_data_timeout` timeout), otherwise we disable changing replica after the first time we made progress.

<h2 id="allow_create_index_without_type">
  allow\_create\_index\_without\_type
</h2>

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

Allow CREATE INDEX query without TYPE. Query will be ignored. Made for SQL compatibility tests.

<h2 id="allow_custom_error_code_in_throwif">
  allow\_custom\_error\_code\_in\_throwif
</h2>

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

Enable custom error code in function throwIf(). If true, thrown exceptions may have unexpected error codes.

<h2 id="allow_ddl">
  allow\_ddl
</h2>

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

If it is set to true, then a user is allowed to executed DDL queries.

<h2 id="allow_distributed_ddl">
  allow\_distributed\_ddl
</h2>

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

If it is set to true, then a user is allowed to executed distributed DDL queries.

<h2 id="allow_drop_detached">
  allow\_drop\_detached
</h2>

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

Allow ALTER TABLE ... DROP DETACHED PART\[ITION] ... queries

<h2 id="allow_dynamic_type_in_join_keys">
  allow\_dynamic\_type\_in\_join\_keys
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.10"},{"label": "0"},{"label": "Disallow using Dynamic type in JOIN keys by default"}]}]} />

Allows using Dynamic type in JOIN keys. Added for compatibility. It's not recommended to use Dynamic type in JOIN keys because comparison with other types may lead to unexpected results.

<h2 id="allow_execute_multiif_columnar">
  allow\_execute\_multiif\_columnar
</h2>

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

Allow execute multiIf function columnar

<h2 id="allow_fuzz_query_functions">
  allow\_fuzz\_query\_functions
</h2>

<ExperimentalBadge />

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.2"},{"label": "0"},{"label": "New setting to enable the fuzzQuery function."}]}]} />

Enables the `fuzzQuery` function that applies random AST mutations to a query string.

<h2 id="allow_general_join_planning">
  allow\_general\_join\_planning
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "1"},{"label": "Allow more general join planning algorithm when hash join algorithm is enabled."}]}]} />

Allows a more general join planning algorithm that can handle more complex conditions, but only works with hash join. If hash join is not enabled, then the usual join planning algorithm is used regardless of the value of this setting.

<h2 id="allow_get_client_http_header">
  allow\_get\_client\_http\_header
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.3"},{"label": "0"},{"label": "Introduced a new function."}]}]} />

Allow to use the function `getClientHTTPHeader` which lets to obtain a value of the current HTTP request's header. It is not enabled by default for security reasons, because some headers, such as `Cookie`, could contain sensitive info. Note that the `X-ClickHouse-*`, `Authentication` and `Authorization` headers are always restricted and cannot be obtained with this function.

<h2 id="allow_hyperscan">
  allow\_hyperscan
</h2>

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

Allow functions that use Hyperscan library. Disable to avoid potentially long compilation times and excessive resource usage.

<h2 id="allow_iceberg_remove_orphan_files">
  allow\_iceberg\_remove\_orphan\_files
</h2>

<ExperimentalBadge />

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.4"},{"label": "0"},{"label": "New setting to gate Iceberg orphan file removal"}]}]} />

Allow to use 'ALTER TABLE ... EXECUTE remove\_orphan\_files()' for iceberg tables.

<h2 id="allow_insert_into_iceberg">
  allow\_insert\_into\_iceberg
</h2>

<BetaBadge />

**Aliases**: `allow_experimental_insert_into_iceberg`

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.2"},{"label": "0"},{"label": "Insert into iceberg was moved to Beta"}]}, {"id": "row-2","items": [{"label": "25.7"},{"label": "0"},{"label": "New setting."}]}]} />

Allow to execute `insert` queries into iceberg.

<h2 id="allow_introspection_functions">
  allow\_introspection\_functions
</h2>

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

Enables or disables [introspection functions](/docs/reference/functions/regular-functions/introspection) for query profiling.

Possible values:

* 1 — Introspection functions enabled.
* 0 — Introspection functions disabled.

**See Also**

* [Sampling Query Profiler](/docs/concepts/features/performance/troubleshoot/sampling-query-profiler)
* System table [trace\_log](/docs/reference/system-tables/trace_log)

<h2 id="allow_key_condition_coalesce_rewrite">
  allow\_key\_condition\_coalesce\_rewrite
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.5"},{"label": "1"},{"label": "New setting to rewrite predicates of the form `coalesce(a_1, ..., a_N) <op> const` (and equivalently `ifNull`, or with the constant on the left) into a disjunction before index analysis, so per-column primary key and skip indexes on each `a_i` can be used. Partial-constant forms such as `coalesce(a, 42, b)` and `coalesce(a, b, 42)` are also handled."}]}]} />

Allow the MergeTree primary key and skip indexes to prune granules for `WHERE`/`PREWHERE` predicates that involve `coalesce` or `ifNull`. Without this setting, such predicates are opaque to index analysis and do not prune, so granules that cannot match are still read. This affects only which granules are read; query results are unchanged, because rows are still filtered by the original predicate.

Two predicate shapes are rewritten before index analysis:

* A comparison against a `coalesce`/`ifNull`, such as `coalesce(a, b) = 5`, becomes a disjunction so an index on each argument can prune: `a = 5 OR (a IS NULL AND b = 5)`, extended for more arguments.
* A `coalesce`/`ifNull` with a falsy (zero) constant default used directly as a condition, such as `ifNull(a = 5, 0)` or `coalesce(a = 5, 0)`, is unwrapped to its inner predicate `a = 5`. Such wrappers collapse the inner predicate's three-valued result into a definite boolean (mapping `NULL` to `false`).

<h2 id="allow_limit_by_partitions_independently">
  allow\_limit\_by\_partitions\_independently
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.6"},{"label": "1"},{"label": "New setting to enable independent per-partition evaluation of `LIMIT BY` when the partition expression is a deterministic function of the `LIMIT BY` columns."}]}]} />

Enable independent `LIMIT BY` evaluation per partition on separate threads when the partition expression is a deterministic function of the `LIMIT BY` columns.

<h2 id="allow_materialized_view_with_bad_select">
  allow\_materialized\_view\_with\_bad\_select
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.4"},{"label": "0"},{"label": "Don't allow creating MVs referencing nonexistent columns or tables"}]}, {"id": "row-2","items": [{"label": "24.9"},{"label": "1"},{"label": "Support (but not enable yet) stricter validation in CREATE MATERIALIZED VIEW"}]}]} />

Allow CREATE MATERIALIZED VIEW with SELECT query that references nonexistent tables or columns. It must still be syntactically valid. Doesn't apply to refreshable MVs. Doesn't apply if the MV schema needs to be inferred from the SELECT query (i.e. if the CREATE has no column list and no TO table). Can be used for creating MV before its source table.

<h2 id="allow_minmax_index_for_json">
  allow\_minmax\_index\_for\_json
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.7"},{"label": "0"},{"label": "Forbid creating minmax skip index on JSON columns by default because the index serialization cannot handle heterogeneous Field values"}]}]} />

Allow creating minmax skip indexes on JSON (Object) columns. Disabled by default because the minmax
index serialization path cannot handle heterogeneous Field values that JSON columns may contain.

<h2 id="allow_named_collection_override_by_default">
  allow\_named\_collection\_override\_by\_default
</h2>

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

Allow named collections' fields override by default.

<h2 id="allow_non_metadata_alters">
  allow\_non\_metadata\_alters
</h2>

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

Allow to execute alters which affects not only tables metadata, but also data on disk

<h2 id="allow_nonconst_timezone_arguments">
  allow\_nonconst\_timezone\_arguments
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.4"},{"label": "0"},{"label": "Allow non-const timezone arguments in certain time-related functions like toTimeZone(), fromUnixTimestamp*(), snowflakeToDateTime*()."}]}]} />

Allow non-const timezone arguments in certain time-related functions like toTimeZone(), fromUnixTimestamp\*(), snowflakeIDToDateTime\*().
This setting exists only for compatibility reasons. In ClickHouse, the time zone is a property of the data type, respectively of the column.
Enabling this setting gives the wrong impression that different values within a column can have different timezones.
Therefore, please do not enable this setting.

<h2 id="allow_nullable_tuple_in_extracted_subcolumns">
  allow\_nullable\_tuple\_in\_extracted\_subcolumns
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.3"},{"label": "0"},{"label": "New setting controlling whether extracted Tuple subcolumns can be nullable."}]}]} />

Controls whether extracted subcolumns of type `Tuple(...)` can be typed as `Nullable(Tuple(...))`.

* `false`: Return `Tuple(...)` and use default tuple values for rows where the subcolumn is missing.
* `true`: Return `Nullable(Tuple(...))` and use `NULL` for rows where the subcolumn is missing.

This setting controls extracted subcolumn behavior only.
It does not control whether `Nullable(Tuple(...))` columns can be created in tables; that is controlled by `enable_nullable_tuple_type`.

ClickHouse uses the value for this setting loaded at server startup.
Changes made with `SET` or query-level `SETTINGS` do not change extracted subcolumn behavior.
To change extracted subcolumn behavior, update `allow_nullable_tuple_in_extracted_subcolumns` in startup profile configuration (for example, users.xml) and restart the server.

<h2 id="allow_rank_dense_rank_arguments">
  allow\_rank\_dense\_rank\_arguments
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.5"},{"label": "0"},{"label": "New setting. Before 26.5, the `RANK` and `DENSE_RANK` window functions silently ignored any provided arguments (equivalent to `allow_rank_dense_rank_arguments = 1`). From 26.5, they reject arguments by default with `NUMBER_OF_ARGUMENTS_DOESNT_MATCH` because per SQL standard these functions take zero arguments. Set this to `1` to restore the legacy behavior."}]}]} />

Allow passing arguments to the `RANK` and `DENSE_RANK` window functions for backward compatibility.

Per SQL standard, `RANK` and `DENSE_RANK` take zero arguments — they rank rows based on the
`OVER (ORDER BY ...)` window only. In ClickHouse versions before 26.5, queries such as
`RANK(x) OVER (...)` silently accepted and ignored the argument, which led to user confusion
(the visible argument suggested it influenced the ranking, but it did not).

When this setting is `false` (the default), `RANK` and `DENSE_RANK` reject any arguments and
throw `NUMBER_OF_ARGUMENTS_DOESNT_MATCH`. When set to `true`, the legacy lenient behavior is
restored — arguments are silently ignored, matching the pre-26.5 behavior.

<h2 id="allow_reorder_prewhere_conditions">
  allow\_reorder\_prewhere\_conditions
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.10"},{"label": "1"},{"label": "New setting"}]}]} />

When moving conditions from WHERE to PREWHERE, allow reordering them to optimize filtering

<h2 id="allow_replace_partition_from_empty_source">
  allow\_replace\_partition\_from\_empty\_source
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.6"},{"label": "0"},{"label": "New safety check: `ALTER TABLE ... REPLACE PARTITION ... FROM ...` now throws when the source table has no parts in the requested partition (fixes the silent data loss in [#23727](https:\/\/github.com\/ClickHouse\/ClickHouse\/issues\/23727)). The previous behavior, silently dropping the destination partition, is preserved by setting `allow_replace_partition_from_empty_source = 1`."}]}]} />

Allow `ALTER TABLE ... REPLACE PARTITION ... FROM ...` to silently drop the destination partition when the source has no parts in that partition.

By default this is disallowed: `REPLACE PARTITION` from a source that has no data in the requested partition raises an exception, because in this case the operation effectively becomes a silent `DROP PARTITION` on the destination (the destination's data is removed and nothing replaces it), a common cause of accidental data loss (see [#23727](https://github.com/ClickHouse/ClickHouse/issues/23727)).

Enable this setting to restore the previous behavior, for example when you intentionally use an empty source partition to clear data in the destination. For an unconditional drop, prefer `ALTER TABLE ... DROP PARTITION ...` instead.

<h2 id="allow_settings_after_format_in_insert">
  allow\_settings\_after\_format\_in\_insert
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "22.4"},{"label": "0"},{"label": "Do not allow SETTINGS after FORMAT for INSERT queries because ClickHouse interpret SETTINGS as some values, which is misleading"}]}]} />

Control whether `SETTINGS` after `FORMAT` in `INSERT` queries is allowed or not. It is not recommended to use this, since this may interpret part of `SETTINGS` as values.

Example:

```sql theme={null}
INSERT INTO FUNCTION null('foo String') SETTINGS max_threads=1 VALUES ('bar');
```

But the following query will work only with `allow_settings_after_format_in_insert`:

```sql theme={null}
SET allow_settings_after_format_in_insert=1;
INSERT INTO FUNCTION null('foo String') VALUES ('bar') SETTINGS max_threads=1;
```

Possible values:

* 0 — Disallow.
* 1 — Allow.

<Note>
  Use this setting only for backward compatibility if your use cases depend on old syntax.
</Note>

<h2 id="allow_simdjson">
  allow\_simdjson
</h2>

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

Allow using simdjson library in 'JSON\*' functions if AVX2 instructions are available. If disabled rapidjson will be used.

<h2 id="allow_special_serialization_kinds_in_output_formats">
  allow\_special\_serialization\_kinds\_in\_output\_formats
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.11"},{"label": "1"},{"label": "Enable direct output of special columns representations like Sparse\/Replicated in some output formats"}]}, {"id": "row-2","items": [{"label": "25.10"},{"label": "0"},{"label": "Add a setting to allow output of special columns representations like Sparse\/Replicated without converting them to full columns"}]}]} />

Allows to output columns with special serialization kinds like Sparse and Replicated without converting them to full column representation.
It helps to avoid unnecessary data copy during formatting.

<h2 id="allow_unrestricted_reads_from_keeper">
  allow\_unrestricted\_reads\_from\_keeper
</h2>

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

Allow unrestricted (without condition on path) reads from system.zookeeper table, can be handy, but is not safe for zookeeper
