When an
unconditional batch shutdown runs (
PROSHUT -by), the following sequence of events takes place:
If there are any running processes left after:
- 30 Seconds - wake up clients waiting for locks.
- 60 Seconds - wake up clients waiting for locks.
- 90 Seconds - wake up clients waiting on screen input.
- 5 Minutes - Resend the shutdown signal to remaining clients.
- 10 Minutes - Send a terminate (SIGTERM) signal to remaining clients.
When an
Emergency Shutdown is performed (
PROSHUT -by -F), the following sequence of events takes place:
- PROSHUT sets the emergency shutdown flag in shared memory.
- PROSHUT kills the Broker (SIGKILL).
- PROSHUT sends the shutdown signal to all connected processes and waits 10 seconds.
- PROSHUT kills all remaining clients (SIGKILL).
- PROSHUT removes shared memory, marks the database as crashed, and removes the dbname.lk file.
The database engine performs normal crash recovery when the database is next accessed after an emergency shutdown and backs out of any active transactions during the Physical and Logical Undo phases of BI recovery.
An emergency shutdown can be initiated in situations when the previously issued "
PROSHUT -by" command seems to be hanging or takes longer than the above 10 minutes.
The difference between PROSHUT -byF and PROSHUT -F
- The "-byF" flag enables an unconditional emergency batch shutdown of the database, suppressing the prompt that appears when PROSHUT -F flag is used alone:
This is rather extreme. All the processes connected to the database will be destroyed. Do you really want to?
Please confirm by entering y for yes:"
- If the database was started with the no integrity flag (-i), an unconditional emergency batch shutdown is disallowed (-byF):
This database was started with no integrity (-i) and you have selected an unconditional forced (-F) shutdown.
An unconditional shutdown of this database is not allowed.
Emergency shutdown cancelled. (6795)
Instead a non-batch shutdown needs to be used when running without bi integrity and the database reverted to the prior backup:
$ proshut <dbname> -F
This database was started with no integrity (-i) and you are attempting to do a forced (-F) shutdown.
Shutting down the database in this way could cause database corruption.
Please confirm by entering y for yes: y
This is rather extreme. All the processes connected to
the database will be destroyed. Do you really want to?
Please confirm by entering y for yes: y
The -F option in PROSHUT is entirely different from the -F option in other commands. For example: