v.21.4Improvements

Added Grant, Revoke, and System Values to query_kind in system.query_log

Added Grant, Revoke and System values of query_kind column for corresponding queries in system.query_log. #21102 (Vasily Nemkov).
Added new Grant, Revoke, and System values to the query_kind column in the system.query_log table to categorize corresponding queries.

Why it matters

This feature provides enhanced visibility into query types by distinctly classifying GRANT, REVOKE, and internal SYSTEM queries in the query log. It helps database administrators and users to better track permission changes and system-level commands, improving auditability and diagnostics.

How to use it

Users can query the system.query_log table and filter or analyze rows where the query_kind column has the values Grant, Revoke, or System, like this:

SELECT * FROM system.query_log WHERE query_kind IN ('Grant', 'Revoke', 'System')

No additional configuration or enabling is required to use this feature.