Sample Exam Questions

From the objective of OSS-DB Exam Silver
S2.5 Basic server administration (Starting and stopping PostgreSQL)

Sample Question

2.42

Choose two appropriate descriptions for the 'pg_ctl stop' command, which is used to stop the database.

 
  1. The shutdown method can be selected with the -m option, but the default is "fast" since PostgreSQL12.

  2. The server does not stop as long as there is a connection with the client in any of the modes.

  3. The "immediate" mode performs crash recovery on the next server start.

  4. The "immediate" mode prevents changes to the PostgreSQL configuration file from taking effect the next time the server starts.

  5. The -t option allows you to specify the number of seconds before the stop operation starts.

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

Answer and Explanation

The -m option allows you to select the shutdown method: smart, fast (default), or immediate.
"fast" and "immediate" force disconnection without waiting for the client to disconnect. The "immediate" mode immediately interrupts all server processes without any cleanup action, so the crash recovery cycle starts the next time the server starts. Changes to the PostgreSQL configuration file will take effect the next time the server starts, regardless of mode.
The -t option allows you to specify the number of seconds before the 'pg_ctl stop' operation completes.

Therefore, the correct answers are A and C.