Diag/scalixdb
Diagnosing ScalixDB
Configure enhanced Postgresql logging
The default Postgresql error logging configuration is very terse. Errors are logged, but not time-stamped. The SQL statement that caused the error is not logged. This makes it hard to determine what caused a database error, or even when it happened. Edit the configuration file at /var/opt/scalix/<instance>/postgres/data/posgresql.conf, modifying the logging configuration as follows:
# panic #log_error_verbosity = default # terse, default, or verbose messages -#log_min_error_statement = panic # Values in order of increasing severity: +log_min_error_statement = error # Values in order of increasing severity: # debug5 # debug4 # debug3 # debug2 @@ -294,9 +294,9 @@ #debug_pretty_print = off #log_connections = off #log_disconnections = off #log_duration = off -#log_line_prefix = '' # Special values: +log_line_prefix = '%d %m ' # Special values: # %u = user name # %d = database name # %r = remote host and port # %h = remote host
Note that because the Postgresql package is inherited from the operating system distribution, and changes may occur in this file between revisions, your file may not look exactly like this. The new log_min_error_statement directive tells Postgresql to log the SQL statement that led to any error. The log_line_prefix directive adds a time stamp and the name of the database to every log record.