v26.2 Changelog for Cloud

### Crash and stability fixes[​](#crash-and-stability-fixes "Direct link to Crash and stability fixes")

- Fixed crash due to reading from a disconnected `Connection`. [#92807](https://github.com/ClickHouse/ClickHouse/pull/92807) ([Raufs Dunamalijevs](https://github.com/rienath)).
- Fixed possible crash with `tokens()` function with null second argument. [#92586](https://github.com/ClickHouse/ClickHouse/pull/92586) ([Raúl Marín](https://github.com/Algunenano)).
- Fixed server crash when `tokens` was called with non-const tokenizer parameters. [#93383](https://github.com/ClickHouse/ClickHouse/pull/93383) ([Robert Schulze](https://github.com/rschu1ze)).
- Fixed potential crash from in-place mutation of underlying const PREWHERE columns during concurrent column shrinking or filtering. [#92588](https://github.com/ClickHouse/ClickHouse/pull/92588) ([Arsen Muk](https://github.com/arsenmuk)).
- Fixed possible hang on terminating background schedule pool, which could lead to server hangs on shutdown. [#93008](https://github.com/ClickHouse/ClickHouse/pull/93008) ([Azat Khuzhin](https://github.com/azat)).
- Fixed leaving connections in a broken state after preliminary cancellation of distributed queries. [#93029](https://github.com/ClickHouse/ClickHouse/pull/93029) ([Azat Khuzhin](https://github.com/azat)).
- Fixed possible `Cannot finalize buffer after cancellation` in `estimateCompressionRatio()`. [#93068](https://github.com/ClickHouse/ClickHouse/pull/93068) ([Azat Khuzhin](https://github.com/azat)).
- Ensured ZooKeeper is finalized on shutdown to fix possible hangs. [#93602](https://github.com/ClickHouse/ClickHouse/pull/93602) ([Azat Khuzhin](https://github.com/azat)).
- Fixed uncaught exception during background named collections reload with ZooKeeper storage. [#92717](https://github.com/ClickHouse/ClickHouse/pull/92717) ([Kseniia Sumarokova](https://github.com/kssenii)).
- Fixed use-of-uninitialized-value in `ReadWriteBufferFromHTTP`. [#94058](https://github.com/ClickHouse/ClickHouse/pull/94058) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fixed `TraceSender` buffer size not being updated, causing interleaved flushes from different threads. [#93966](https://github.com/ClickHouse/ClickHouse/pull/93966) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
- Stored storage shared pointers in `QueryPipeline` to ensure `IStorage` objects are not destroyed while `PipelineExecutor` is alive. [#93746](https://github.com/ClickHouse/ClickHouse/pull/93746) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
- Fixed possible crash for distributed queries in case of cancellation. [#95466](https://github.com/ClickHouse/ClickHouse/pull/95466) ([Aleksandr Musorin](https://github.com/AVMusorin)).
- Fixed crash on `DROP WORKLOAD` while running concurrently with queries. [#95856](https://github.com/ClickHouse/ClickHouse/pull/95856) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fixed data race on `DROP WORKLOAD`. [#96614](https://github.com/ClickHouse/ClickHouse/pull/96614) ([Sergei Trifonov](https://github.com/serxa)).
- Fixed several critical bugs around `ThreadPoolCallbackRunnerLocal` usage. [#95818](https://github.com/ClickHouse/ClickHouse/pull/95818) ([Raúl Marín](https://github.com/Algunenano)).
- Fixed possible deadlock in `ProcessList` due to lock inversion when memory overcommit tracker triggered. [#96182](https://github.com/ClickHouse/ClickHouse/pull/96182) ([Antonio Andelic](https://github.com/antonio2368)).
- Fixed livelock in the cancellation checker thread for queries with high `max_execution_time`. [#96450](https://github.com/ClickHouse/ClickHouse/pull/96450) ([Sergei Trifonov](https://github.com/serxa)).
- Fixed MemoryWorker purging thread being stuck due to a race condition. [#96819](https://github.com/ClickHouse/ClickHouse/pull/96819) ([Antonio Andelic](https://github.com/antonio2368)).
- Fixed crash in `clearCaches` caused by premature destruction of cached storage snapshots. [#96995](https://github.com/ClickHouse/ClickHouse/pull/96995) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fixed `heap-use-after-free` in `CREATE TABLE` with constraints. [#96669](https://github.com/ClickHouse/ClickHouse/pull/96669) ([Nikita Taranov](https://github.com/nickitat)).
- Fixed possible use-after-free in `StorageKafka2`. [#97520](https://github.com/ClickHouse/ClickHouse/pull/97520) ([Bharat Nallan](https://github.com/bharatnc)).
- Fixed data race on `shutdown_called` in `DatabaseMaterializedPostgreSQL`. [#97554](https://github.com/ClickHouse/ClickHouse/pull/97554) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fixed race condition in sharded `HASHED` dictionary parallel loading that could cause some rows to not be loaded. [#96953](https://github.com/ClickHouse/ClickHouse/pull/96953) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fixed deadlock in dictionaries when one dictionary referenced a Merge table that referenced it recursively. [#96120](https://github.com/ClickHouse/ClickHouse/pull/96120) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fixed `BaseSettings::readBinary` out-of-bounds access when a newer server sent an unknown setting during query plan deserialization. [#97585](https://github.com/ClickHouse/ClickHouse/pull/97585) ([Michael Stetsyuk](https://github.com/mstetsyuk)).
- Fixed crash when attaching a table to a `MaterializedPostgreSQL` database if `dropReplicationSlot` threw during stack unwinding. [#96871](https://github.com/ClickHouse/ClickHouse/pull/96871) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Released request stream in insert select to prevent closing HTTP connection. [#92175](https://github.com/ClickHouse/ClickHouse/pull/92175) ([Sema Checherinda](https://github.com/CheSema)).
- Fixed deadlock for `SHOW CREATE DATABASE` for Backup database. [#92541](https://github.com/ClickHouse/ClickHouse/pull/92541) ([Azat Khuzhin](https://github.com/azat)).

### Other bug fixes[​](#other-bug-fixes "Direct link to Other bug fixes")

- Fixed `handleAllTokens` empty array handling in `hasAllTokens` and `hasAnyTokens` functions. [#93328](https://github.com/ClickHouse/ClickHouse/pull/93328) ([Anton Popov](https://github.com/CurtizJ)).
- Fixed period for global profilers — a truncated value was used instead of the set value, causing more frequent wakeups. [#96048](https://github.com/ClickHouse/ClickHouse/pull/96048) ([Antonio Andelic](https://github.com/antonio2368)).
- Fixed `event_date` in `system.asynchronous_metric_log`. [#95947](https://github.com/ClickHouse/ClickHouse/pull/95947) ([Raúl Marín](https://github.com/Algunenano)).
- Fixed `system.functions` showing empty string instead of `categories = 'Internal'` for internal functions. [#97315](https://github.com/ClickHouse/ClickHouse/pull/97315) ([Robert Schulze](https://github.com/rschu1ze)).
- Fixed a possible logical error in `ip_trie` dictionary when key type was not String. [#97555](https://github.com/ClickHouse/ClickHouse/pull/97555) ([Bharat Nallan](https://github.com/bharatnc)).
- Fixed UDF debugging by enabling stderr capture in `system.query_log.exception`. [#92209](https://github.com/ClickHouse/ClickHouse/pull/92209) ([Xu Jia](https://github.com/XuJia0210)).
- Fixed `filterPartsByVirtualColumns` for constant-false predicates. [#97620](https://github.com/ClickHouse/ClickHouse/pull/97620) ([Bharat Nallan](https://github.com/bharatnc)).
- Fixed `ColumnConst` not materialized before squashing. [#97019](https://github.com/ClickHouse/ClickHouse/pull/97019) ([Hasyimi Bahrudin](https://github.com/hasyimibhar)).