488488fi
489489
490490# WINDOW VIEW available 21.12+
491- if [[ " ${CLICKHOUSE_VERSION} " == " head" || " ${CLICKHOUSE_VERSION} " =~ ^2[2-9]\. [1-9] || " ${CLICKHOUSE_VERSION} " =~ ^21\. 1[1-2] ]]; then
491+ if [[ " ${CLICKHOUSE_VERSION} " == " head" || " ${CLICKHOUSE_VERSION} " =~ ^2[2-9]\. [1-9] || " ${CLICKHOUSE_VERSION} " =~ ^21\. 12 ]]; then
492492
493493cat << EOT > /etc/clickhouse-server/users.d/allow_experimental_window_view.xml
494494<yandex>
548548fi
549549
550550
551- if [[ " ${CLICKHOUSE_VERSION} " =~ ^2[0] \. [1-3] ]]; then
551+ if [[ " ${CLICKHOUSE_VERSION} " =~ ^20 \. [1-3] ]]; then
552552
553553cat << EOT > /etc/clickhouse-server/users.d/low_memory_in_usersd.xml
554554<yandex>
@@ -572,7 +572,7 @@ cat <<EOT > /etc/clickhouse-server/config.d/low_memory_in_configd.xml
572572</yandex>
573573EOT
574574
575- elif [[ " ${CLICKHOUSE_VERSION} " =~ ^2[0] \. [4-9] ]]; then
575+ elif [[ " ${CLICKHOUSE_VERSION} " =~ ^20 \. [4-9] ]]; then
576576
577577cat << EOT > /etc/clickhouse-server/users.d/low_memory_in_usersd.xml
578578<yandex>
@@ -597,7 +597,7 @@ cat <<EOT > /etc/clickhouse-server/config.d/low_memory_in_configd.xml
597597</yandex>
598598EOT
599599
600- elif [[ " ${CLICKHOUSE_VERSION} " =~ ^21\. ]]; then
600+ elif [[ " ${CLICKHOUSE_VERSION} " =~ ^21\. [1-9]$ || " ${CLICKHOUSE_VERSION} " =~ ^21 \. 10 ]]; then
601601
602602cat << EOT > /etc/clickhouse-server/users.d/low_memory_in_usersd.xml
603603<yandex>
@@ -621,6 +621,30 @@ cat <<EOT > /etc/clickhouse-server/config.d/low_memory_in_configd.xml
621621</yandex>
622622EOT
623623
624+ elif [[ " ${CLICKHOUSE_VERSION} " =~ ^21\. 1[1-9] ]]; then
625+
626+ cat << EOT > /etc/clickhouse-server/users.d/low_memory_in_usersd.xml
627+ <yandex>
628+ <profiles>
629+ <default>
630+ <background_pool_size>2</background_pool_size>
631+ <background_buffer_flush_schedule_pool_size>1</background_buffer_flush_schedule_pool_size>
632+ <background_message_broker_schedule_pool_size>1</background_message_broker_schedule_pool_size>
633+ <background_fetches_pool_size>1</background_fetches_pool_size>
634+ <background_merges_mutations_concurrency_ratio>2</background_merges_mutations_concurrency_ratio>
635+ </default>
636+ </profiles>
637+ </yandex>
638+ EOT
639+
640+ cat << EOT > /etc/clickhouse-server/config.d/low_memory_in_configd.xml
641+ <yandex>
642+ <tables_loader_foreground_pool_size>0</tables_loader_foreground_pool_size>
643+ <tables_loader_background_pool_size>0</tables_loader_background_pool_size>
644+ <background_merges_mutations_scheduling_policy>round_robin</background_merges_mutations_scheduling_policy>
645+ </yandex>
646+ EOT
647+
624648elif [[ " ${CLICKHOUSE_VERSION} " =~ ^22\. ]]; then
625649
626650cat << EOT > /etc/clickhouse-server/users.d/low_memory_in_usersd.xml
676700fi
677701
678702
679- if [[ " ${CLICKHOUSE_VERSION} " == " head" || " ${CLICKHOUSE_VERSION} " =~ ^21\. [3-9]+ || " ${CLICKHOUSE_VERSION} " =~ ^2[2-9]\. [1-9]+ ]]; then
703+ if [[ " ${CLICKHOUSE_VERSION} " == " head" || " ${CLICKHOUSE_VERSION} " =~ ^21\. [3-9]+ || " ${CLICKHOUSE_VERSION} " =~ ^21 \. 1[0-9]+ || " ${CLICKHOUSE_VERSION} " =~ ^ 2[2-9]\. [1-9]+ ]]; then
680704cat << EOT > /etc/clickhouse-server/users.d/allow_experimental_database_replicated.xml
681705<yandex>
682706 <profiles><default><allow_experimental_database_replicated>1</allow_experimental_database_replicated></default></profiles>
0 commit comments