Sample Exam Questions

From the objective of OSS-DB Exam Silver
- Operation and Management - Configuration files -
error reporting and log acquisition

Sample Question


Which two of the following are correct explanations of the
parameters configured in postgresql.conf?

  1. log_destination specifies the file name to which the log will be output.
  2. When logging_collector is set to on, standard error log messages can be redirected to a log file.
  3. When log_connections is set to on, connection attempts from the client to server are recorded in the log.
  4. When log_statement is set to on, SQL statements are recorded to the log.
  5. When log_line_prefix is set to on, various additional information, such as log information output time, username, and process ID are included in the log file. 

※This sample exam is different from those that appear in the actual OSS-DB Exam.

Answer and Explanation

PostgreSQL has extensive log output functionality; however, in its default configuration the information necessary for detecting and investigating problems will not be output to the log. The log output functionality should be understood correctly and appropriate settings configured before starting operation. There is an explanation of the various parameters in the online manual.

log_destination is the parameter used to specify where the log will be output; however, log_destination specifies stderr, csvlog, or syslog, rather than a file name.

Log messages sent to stderr (standard error output) or csvlog can be redirected to a file by setting logging_collector to on. When logging_collector is on, the log file directory or file name to which they will be redirected is configured with log_directory or log_filename, respectively.

log_connections is the parameter used to output client to server connection attempts to the log. As the default is off, they will not be output; however, when set to on, connection attempts will be recorded.

log_statement is the parameter used to set which SQL statements are recorded to the log. Valid settings are none, ddl, mod, and all. Since the default setting is none, no SQL statements will be recorded.

log_line_prefix specifies, in printf format, the string format to be output at the start of each line in the log. For example, %u outputs the user name, %p outputs the process ID, and %t outputs the time. The default setting is a blank character string, which means that nothing is output. Therefore, it is imperative to configure this in an appropriate way when using logging_collector to redirect the standard error output.

Therefore, the correct answers are B and C.

There is a description of the other server settings in Chapter 18 of the manual.
Questions on notation, connection and authentication, client connection defaults, error reporting, and log acquisition may appear on the OSS-DB Exam Silver, so these topics should be reviewed before taking the exam.