It seems to be the Quick Install does not contain the system.query_log table. The config.xml does not have the entry within and even inserted the query_log section. Restarted the ClickHouse server, the table still does not appear. Did the SYSTEM FLUSH LOGS and that did not trigger the creation of the table as well.
┌─name────────┬─value─┐
│ log_queries │ 1 │
└───────────┴─────┘
Inserted the following according to what has been suggested by the Clickhouse blog, and it did not trigger the query_log table creation.
https://github.com/ClickHouse/ClickHouse/issues/11194
<database>system</database>
<table>query_log</table>
<engine>Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + INTERVAL 30 day</engine>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
<max_size_rows>1048576</max_size_rows>
<reserved_size_rows>8192</reserved_size_rows>
<buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold>
<flush_on_crash>false</flush_on_crash>
</query_log>
However, the full install do contain the system.query_log table by default.
https://clickhouse.com/docs/install/debian_ubuntu
I think this could be the reason. The Quick Install (https://clickhouse.com/docs/install/quick-install-curl) starts up Clickhouse with ./clickhouse server. While looking at the ps -ef|grep clickhouse, it does not associate to the config.xml file.
While with the full install, the Clickhouse started with the (sudo service clickhouse-server start) and ps -ef|grep clickhouse apparently has the config.xml associated with. Upon validating the config.xml, it does the have the query_log block. So, in the case of a Quick Install, the startup will have to call (./clickhouse server -C flag) In order to have the query_log created during the start up, the config.xml will need the query_log section.
clickho+ 133853 1 0 13:27 ? 00:00:00 clickhouse-watchdog --config=/etc/clickhouse-server/config.xml --pid-file=/run/clickhouse-server/clickhouse-server.pid
clickho+ 133861 133853 48 13:27 ? 01:11:52 /usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml --pid-file=/run/clickhouse-server/clickhouse-server.pid
shimano 137068 136336 0 15:56 pts/2 00:00:00 grep --color=auto clickhouse
This isn't necessarily an issue, but perhaps it needs documentation for the Quick Install on how to start up the ./clickhouse server with config.xml.
No comments:
Post a Comment