You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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".
Provides successively-more-detailed information for use by developers.
INFO
Provides information implicitly requested by the user, e.g., output from VACUUM VERBOSE.
NOTICE
Provides information that might be helpful to users, e.g., notice of truncation of long identifiers.
WARNING
Provides warnings of likely problems, e.g., COMMIT outside a transaction block.
ERROR
Reports an error that caused the current command to abort.
LOG
Reports information of interest to administrators, e.g., checkpoint activity.
FATAL
Reports an error that caused the current session to abort.
PANIC
Reports an error that caused all database sessions to abort.
Each logging level includes all subsequent levels as well.
For example, WARNING encompasses ERROR, LOG, FATAL, and PANIC because it sits above them in the hierarchy.
If you do not want to log RAISE LOG values, you'll have to set log_min_messages to FATAL or PANIC. Alternatively, you could also just use RAISE NOTICE instead.
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: