max_bytes_to_buffer_for_packed_part
Maximum amount of memory taken by the buffered data of a packed data part while it is written by an insert, a merge or a mutation. A packed part keeps the data of all its files in memory until the part is finalized. Once the buffered data exceeds this limit, the data of the largest files is moved to temporary files in the server temporary storage (tmp_path, tmp_policy or
temporary_data_in_cache) and read back on finalization. The temporary files are accounted by
max_temporary_data_on_disk_size_for_query and max_temporary_data_on_disk_size_for_user.
The last block (up to 64 KiB) of each file that is still being written cannot be moved, so a part
with many files written at once, such as a wide part with many columns, can take more memory.
The data of a part is moved to one temporary file, whose write buffers (about 2 MiB with the default
temporary_files_buffer_size) stay in memory until the part is finalized.
The limit applies separately to the part and to each of its projections. 0 means unlimited.
max_bytes_to_merge_at_max_space_in_pool
The maximum total parts size (in bytes) to be merged into one part, if there are enough resources available. Corresponds roughly to the maximum possible part size created by an automatic background merge. (0 means merges will be disabled) Possible values:- Any non-negative integer.
max_bytes_to_merge_at_max_space_in_pool.
Merges initiated by OPTIMIZE FINAL
ignore max_bytes_to_merge_at_max_space_in_pool (only the free disk space
is taken into account).
max_bytes_to_merge_at_min_space_in_pool
The maximum total part size (in bytes) to be merged into one part, with the minimum available resources in the background pool. Possible values:- Any positive integer.
max_bytes_to_merge_at_min_space_in_pool defines the maximum total size of
parts which can be merged despite the lack of available disk space (in pool).
This is necessary to reduce the number of small parts and the chance of
Too many parts errors.
Merges book disk space by doubling the total merged parts sizes.
Thus, with a small amount of free disk space, a situation may occur in which
there is free space, but this space is already booked by ongoing large merges,
so other merges are unable to start, and the number of small parts grows
with every insert.