v.25.12Improvement

Add profile events FailedInitialQuery and FailedInitialSelectQuery

Add profile events FailedInitialQuery and FailedInitialSelectQuery. #91172 (RinChanNOW).
Introduces new profile events FailedInitialQuery and FailedInitialSelectQuery to track failures in initial query executions in ClickHouse.

Why it matters

These profile events help detect and diagnose issues occurring during the execution of the very first queries sent to ClickHouse. This improvement allows users and administrators to better monitor and troubleshoot query startup failures, improving reliability and observability.

How to use it

Users can monitor these new profile events through ClickHouse's profile events monitoring interface or by querying the system tables that track profile events. These events are automatically recorded when failures happen in initial queries, requiring no extra configuration.