Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

table_* MergeTree table settings

These settings are available in system.merge_tree_settings and are autogenerated from ClickHouse source.

table_disk

Type
Bool
Default
0
Version history
VersionDefault valueComment
25.20New setting

This is table disk: the path/endpoint points to the table data, not the database data. Supported for object-storage disks whose metadata lives on the object storage itself (s3_plain, s3_plain_rewritable, web, web_index) and their cached variants. Encrypted variants are supported only over the writable s3_plain / s3_plain_rewritable disks, not over the read-only web / web_index disks.

table_readonly

Type
Bool
Default
0
Version history
VersionDefault valueComment
26.30New setting to mark table as read-only, preventing inserts and modifications

If set to true, the table is in read-only mode and performs no modifications on disk.

All foreground operations that would modify the table are rejected: inserts, mutations, OPTIMIZE, and the data-mutating partition commands (ATTACH/MOVE/DROP/DROP DETACHED/FETCH/REPLACE PARTITION, as well as MOVE PARTITION ... TO TABLE targeting this table). Operations that do not modify the table’s data, such as FREEZE/UNFREEZE and FORGET PARTITION, remain allowed.

No background work is scheduled either: regular merges, TTL merges (DELETE/MOVE/recompression), recompression merges, background mutations, and background part moves are all suppressed. As a consequence, a table with a TTL no longer reclaims or moves its expired data while this setting is enabled.

The setting can always be toggled back with ALTER TABLE ... MODIFY SETTING table_readonly = 0 (or RESET SETTING). It is not supported for ReplicatedMergeTree.

Navigation