-
Notifications
You must be signed in to change notification settings - Fork 195
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
pg_cron writing every client_min_messages to log file #350
Comments
Yep! That is really annoying. E.g. I have a plsql block that executes every 10 seconds. It writes tons of notice message, all of them appearing in my log making it almost a TB per during the day. Although I have set "log_min_messages" to "warning". |
This is not a bug in
Each logging level includes all subsequent levels as well. For example, If you do not want to log |
I am also annoyed by this functionality and I'm not sure you've addressed the issue @TheOtherBrian1. For example, currently, I have The proper behavior should be that jobs run on an automated basis should be honoring the |
Yeh, I agree, we should reduce the log levels. |
@alexitheodore, what platform are you using? Supabase, Aiven, etc? The reason I ask is because this may be a side-effect of a permission granting extension, such as aiven-pg-security or supautils. Does it happen in regular functions, too, or just ones executed by pg_cron? |
@TheOtherBrian1 I am using an old school build. pgv13 on Ubuntu. Does not happen on regular functions - just pg_cron. |
@alexitheodore, that removes a lot of the noise. This does appear to be a bug |
Based on the 'client_min_messages' parameter in postgresql.conf, all functions that have RAISE something have their messages written to the file specified in 'log_filename', regardless of the parameter log_min_messages = warning.
Example: if I have client_min_messages = notice, all functions executed via pg_cron job that have RAISE INFO 'hello' or RAISE NOTICE 'hello', have the RAISE parameters saved in the file log_filename, even if log_min_messages = warning.
It would be interesting to have a way to disable this, since the messages in 'client_min_messages' should only appear on the screen when the functions are executed by the user, not by pg_cron.
The text was updated successfully, but these errors were encountered: