Sample Exam Questions

From the objective of OSS-DB Exam Gold
- Advanced Server Administration - Commands for database administration

Sample Question

1.03

When a log file with the same name exists during log rotation, which of the following settings determines whether to append or to overwrite the file?

  1. log_min_error_statement

  2. log_rotation_age

  3. log_directory

  4. log_truncate_on_rotation

  5. log_connections

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

Answer and Explanation

The correct answer is "D. log_truncate_on_rotation".

log_truncate_on_rotation allows you to configure whether to append or to overwrite a log file with the same name during log rotation.
If set to "on", the log file will be overwritten if one with the same name already exists during log rotation.
However, this overwriting will only occur if the rotation happens while the PostgreSQL service is running, not when the service is started or when the rotation is based on size.
If set to "off", no overwriting will occur and the existing file will be appended to.

Each option is explained below.

A. log_min_error_statement
Incorrect.
log_min_error_statement sets the level at which SQL statements that result in errors are logged.
You can specify DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, INFO, NOTICE, WARNING, ERROR, LOG, FATAL, PANIC.

B. log_rotation_age
Incorrect.
log_rotation_age is a setting that rotates log files at a specified time interval.

C. log_directory
Incorrect.
log_directory is a setting that determines which directory log files are stored in.

D. log_truncate_on_rotation
Correct.

E. log_connections
Incorrect.
log_connections is a setting for outputting information about connections to the server.