v.21.1Improvements

Now Distinct Interface Types for MySQL and PostgreSQL Queries in Query Log

Now queries coming to the server via MySQL and PostgreSQL protocols have distinctive interface types (which can be seen in the interface column of the tablesystem.query_log): 4 for MySQL, and 5 for PostgreSQL, instead of formerly used 1 which is now used for the native protocol only. #17437 (Vitaly Baranov).
ClickHouse now assigns distinct interface types to queries received via MySQL and PostgreSQL protocols in the system.query_log table, using 4 for MySQL and 5 for PostgreSQL, while retaining 1 for the native protocol.

Why it matters

This feature improves the visibility and differentiation of query sources by protocol in the system.query_log. It helps administrators and users to easily identify whether a query came through the MySQL, PostgreSQL, or native ClickHouse protocol, enhancing monitoring and debugging capabilities.

How to use it

Users can view the interface type of incoming queries by querying the system.query_log table and inspecting the interface column. Values 4 and 5 correspond to MySQL and PostgreSQL protocols respectively, while 1 indicates the native ClickHouse protocol. No additional configuration is required to enable this feature.