-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: add a new optional secondary logger for internal slow queries
Previously, all slow queries were logged to the slow query log, regardless of whether they were internal or from the user. This made it easy for user queries to get lost in the log. This patch removes internal queries from the slow query log and adds a new optional opt-in cluster setting, `sql.log.slow_query.internal_queries.enabled`. When set to true, all internal queries that have service latency above the slow query log threshold will be logged to `cockroach-sql-slow-internal-only.log`. This new setting is a no-op if the slow query log hasn't been turned on, i.e there is no latency threshold set. Closes #50201 Release note (sql change): adds a new cluster setting `sql.log.slow_query.internal` which when turned on in conjunction with the slow query log causes internal queries to be logged to an internal query only slow query log, at `cockroach-sql-slow-internal-only.log`. Internal queries are no longer logged to the slow query log. This new setting is opt-in, so default behavior is to not log internal slow queries.
- Loading branch information
1 parent
ea094e9
commit 71d1502
Showing
4 changed files
with
49 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters