We have a clickhouse cluster consisting of two nodes, lets call them node_a
and node_b
.
I know that they have different values of 'enable_analyzer' setting - 1 for node_a
and 0 for node_b
.
But when I run this query, it shows the same value for both nodes:
select hostName(), value
from clusterAllReplicas('cluster_ab',system.settings)
where name = 'enable_analyzer'
Particularly, if I run the query from node_a
, it shows 1's for both nodes.
If I run it from node_b
, it shows 0's for both nodes.
So it shows the value from the current node for both nodes.
What am I doing wrong and how to do it better?
Thank you.
Surprisingly, it works well with some other settings like max_threads
clickhouse version 24.9.2.42
We have a clickhouse cluster consisting of two nodes, lets call them node_a
and node_b
.
I know that they have different values of 'enable_analyzer' setting - 1 for node_a
and 0 for node_b
.
But when I run this query, it shows the same value for both nodes:
select hostName(), value
from clusterAllReplicas('cluster_ab',system.settings)
where name = 'enable_analyzer'
Particularly, if I run the query from node_a
, it shows 1's for both nodes.
If I run it from node_b
, it shows 0's for both nodes.
So it shows the value from the current node for both nodes.
What am I doing wrong and how to do it better?
Thank you.
Surprisingly, it works well with some other settings like max_threads
clickhouse version 24.9.2.42
Share Improve this question edited Feb 6 at 9:26 Dmitry Grekov asked Feb 6 at 8:23 Dmitry GrekovDmitry Grekov 6883 silver badges12 bronze badges1 Answer
Reset to default 0looks like when you run cluster()
distributed select, then sub-queries in destination nodes executed under default
user
to avoid it, use <secret>
in <remote_servers>
config section, look details in https://clickhouse.com/docs/en/engines/table-engines/special/distributed#distributed-clusters