v.20.11New Feature

errorCodeToName function and system.errors table enhancements for better error analysis

errorCodeToName function - return variable name of the error (useful for analyzing query_log and similar). system.errors table - shows how many times errors has been happened (respects system_events_show_zero_values). #16438 (Azat Khuzhin).
errorCodeToName function returns the variable name of an error, and the system.errors table tracks the occurrence count of errors, respecting the system_events_show_zero_values setting.

Why it matters

This feature helps users analyze errors more effectively by providing a human-readable error name from error codes and offering aggregated error statistics through the system.errors table. It simplifies debugging and monitoring of query failures and system issues.

How to use it

Use the errorCodeToName function in queries to convert error codes to their variable names. Query the system.errors table to see how many times each error has occurred. The error counts respect the system_events_show_zero_values setting to include or exclude zero-value entries.