I am using the log_min_error_statement - Setting in the PostgreSQL configuration file, but the logger does not react on the setting, either if I turn it on, or off, or set it to another level, the logger logs every statement. Could this be a possible bug in PostgreSQL logging?
1 Answer
the logger logs every statement
Then that behavior comes from log_statement:
log_statement (enum)
Controls which SQL statements are logged. Valid values are none (off), ddl, mod, and all (all statements). ddl logs all data definition statements,
-
yes i had to turn that to all, but there is no other granularity for statements, i need them, but only if errors occur, i thought maybe log_min_message can trigger when statements are logged, will have to test it next week, by the way, is there anyone that knows in which order and how the evaluation of the log configurations is done? Commented Aug 7, 2015 at 11:05
-
2@ErdincAy Logging only when errors occur is the default configuration. For your questions there's an entire doc page about it, please read it: postgresql.org/docs/current/static/runtime-config-logging.html Commented Aug 7, 2015 at 11:23
-
1I do understand your comment, and I also know the PostgreSQL article to this topic, but where is the LOGIC, which config counts first, which ORDER is being used to trigger, filter, write the logs? I can't imagine that all these people have an execution plan for PostgreSQL in their brains. Commented Aug 10, 2015 at 13:07
SHOW log_min_error_statement;
and make sure it matches up with your PostgreSQL config? Also, are there any errors regarding configuration in your logs?