v.21.6New Feature
Added max_distributed_depth Setting for Recursive Queries on Distributed Tables
Added a settingmax_distributed_depththat limits the depth of recursive queries toDistributedtables. Closes #20229. #21942 (flynn).
Why it matters
This feature prevents excessively deep or potentially infinite recursive queries onDistributed tables, improving query stability and protecting server resources from overload caused by deep distributed query chains.How to use it
Set themax_distributed_depth configuration parameter to an integer value representing the maximum allowed recursive depth for queries on Distributed tables. For example, in the server configuration or client session, specify:SET max_distributed_depth = <desired_depth>;