v.19.3Improvements

Table Index Size Is Not Accounted for Memory Limits When Doing ATTACH TABLE Query

Table index size is not accounted for memory limits when doing ATTACH TABLE query. Avoided the possibility that a table cannot be attached after being detached. #4396 (alexey-milovidov)
Accounting for table index size in memory limits during ATTACH TABLE queries to prevent attachment failures caused by inadequate memory allocation.

Why it matters

Before this change, the memory used by a table's index was not considered when executing the ATTACH TABLE command, which could cause the operation to fail if the available memory was insufficient. This feature ensures the index size is included in memory calculations to reliably attach detached tables without running into memory limit issues.

How to use it

The feature is applied automatically in the ATTACH TABLE command; no additional user configuration is required. When you detach and then attach a table, ClickHouse now accounts for the index size to ensure successful attachment.