-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add log_queries_min_type to filter which entries will be written to query_log #10053
Conversation
There is no assumed order in values of |
Current solution does not look practical. |
Ok, how about making enum of the following possible values in settings?
|
Almost Ok. We have to made setting values consistent with Enum values in system.query_log (QueryFinish instead of query_finish). If the user really wants to get this feature, they can use Null engine for system.query_log and create a meterialized view on top of it. Maybe it's enough? |
PS. Please don't worry about "spam" assigments by Ivan Blinkov. He has written a script that assigns pull request to random people. We decided that we will remove this script but Ivan has not stopped it yet. |
For some uses cases - yes, but it will not allow to change the type without recreating the table. Why I found this useful is:
P.S. I knew it! (since it tags the PR as soon as it has been submitted). |
I can add parsing of a string, i.e. P.S. at first I wanted to log only errors, but when I was writing the patch I decided to excluding say QUERY_START also can be useful |
Ok. Let's make it as simple as possible. Reason: this will make the implementation of this setting obvious (that it compares numeric values of |
…uery_log Can be used to write into query_log only failed queries (i.e. on memory exceeded error), by using: set log_queries_min_type='EXCEPTION_WHILE_PROCESSING'
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Add log_queries_min_type to filter which entries will be written to query_log
Detailed description / Documentation draft:
Can be used to write into query_log only failed queries (i.e. on memory
exceeded error), by using: