Sample Exam Questions

From the objective of OSS-DB Exam Silver
- Operation management - configuration file

Sample Question

1.51

Please select two correct statements about using the SET command.

  1. You may change values for any of  the parameters found in the postgresql.conf using the SET command.
  2. Some parameters become effective immediately when changed with the SET command, others require use of another command like ‘pg_ctl reload’ for the change to take effect.

  3. The SET command only applies to the session, when your psql session ends, your modified values are lost and the original values are restored.
  4. Changes made using a command like SET LOCAL parameter = value; will only apply until the corresponding  COMMIT command, after which  parameters return to their original value.

  5. Because using the SET command can have a serious effect on the system, only the superuser of the database is allowed to execute it

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

Answer and Explanation

Many of the parameters set in postgresql.conf can be changed with the SET command. However, not all parameters can be changed.

Although the changes  by the SET command are effective immediately, since the effective range is limited to the session unit or the transaction unit, all sessions such as a psql session that use it employ the changes only for that session.

The default effective range of the SET command is a session unit, but specification of the LOCAL option, causes it to become a transactional unit, so when you end the transaction with COMMIT or ROLLBACK, the parameter value returns to the original value.

Although execution of the SET command itself does not require any special privileges, superuser privileges are required to change the settings of some parameters (eg lc_messages).

 

Therefore, the correct answers are C and D.