Sample Exam Questions

From the objective of OSS-DB Exam Silver
- Operation management - error report and log acquisition

Sample Question

1.59

Choose two correct statements for the parameters you set in postgresql.conf.

  1. For the log_destination parameter, specify the location of where log  files should be written.When you run the createdb command, by default, a copy of template1 is created.

  2. By setting logging_collector to on, it is possible to redirect the log message sent to the standard error output to the log file.
  3. By setting log_connections to on, a connection attempt from the client to the server is output to the log.

  4. By setting logging SQL statements to on, logging SQL statement can be logged.

  5. By setting log_line_ prefix to on, various additional information such as log information output time, user name, process ID and so on are output to the log file. 

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

Answer and Explanation

Be sure to understand the log output function properly and make appropriate settings before starting operation. For individual parameters, there is explanation in the online manual.

https://www.postgresql.org/docs/9.5/static/runtime-config-logging.html

log_destination is a parameter that specifies the output destination of the log, but instead of specifying the file name, specify the output method such as stderr, csvlog, syslog.

Log messages sent to stderr (standard error output) or csvlog can be redirected to a file by setting logging_collector to on. At this time, set the directory and file name of the log file to be redirected by log_directory and log_filename.

log_connections is a parameter that logs an attempt to connect the client to the server. The default is off, so it will not be output, but if you set it to on, recording will remain.

log_statement is a parameter that controls which SQL statement is logged, valid values are none, ddl, mod, all. The default is none, so nothing is recorded.

log_line_prefix specifies the format string to be output at the beginning of each log line with printf format. For example %u is the user name, %p is the process ID, %t is the time. Since default is empty, nothing is output, so if you are redirecting standard error output, especially using logging_collector, you need to set it appropriately.

 

Therefore, the correct answers are B and C.

 

For other server settings, there is explanation in Chapter 18 of the manual.

https://www.postgresql.org/docs/9.5/static/config-setting.html

Descriptive method, connection and authentication, client connection defaults, error reporting and logging are the scope of question of OSS-DB Exam Silver, so let's review before taking the exam.