You can stop a database by executing pg_ctl stop from the command line
If you do not specifically specify at the time of termination, the client connected to the database is automatically disconnected and the running transaction is rolled back
Only the administrator user of the database (postgres in many circumstances) can execute to stop a database, it cannot be executed under the authority of the OS administrator user (Linux root)
※This sample exam is different from those that appear in the actual OSS-DB Exam.
2019/05/30
The stopping of the PostgreSQL database is performed by the database administrator user (postgres in many circumstances), by executing the following command from the command line.
pg_ctl stop
From Linux it is possible to stop it with the following command as the root user
service postgresql-server stop
You may specify the stop mode in the pg_ctl command as below:
pg_ctl stop -m shutdown-mode
There are three shutdown-modes: smart, fast, and immediate.
In smart mode, where there are any connected clients, the database will wait for them to disconnect before stopping the database.
Fast mode forces a disconnect of the connected client and rolls back the running transaction.
Immediate mode forcibly terminates the database process, in addition to disconnecting the connected client and rolling back the transaction, without checkpoints and other processing. For data that has not been reflected in the data file, recovery processing will work at restart, but immediate should be used only in emergencies.
Since the default for the stop mode is smart, unless you specify the option, the database shutdown processing will not be executed until the connected client is terminated.
Therefore, the correct answers are B and E.