Vertica Analytics Platform Version 9.2.x Documentation

SHUTDOWN

Forces a database to shut down, even if there are users connected.

Syntax

SHUTDOWN ( [ 'false' | 'true' ])

Parameters

false

[Default] Returns a message if users are connected. Has the same effect as supplying no parameters.

true

Performs a moveout operation and forces the database to shut down, disallowing further connections.

Privileges

Superuser

Notes

  • Quotes around the true or false arguments are optional.
  • Issuing the shutdown command without arguments or with the default (false) argument returns a message if users are connected, and the shutdown fails. If no users are connected, the database performs a moveout operation and shuts down.
  • Issuing the SHUTDOWN('true') command forces the database to shut down whether users are connected or not.
  • You can check the status of the shutdown operation in the vertica.log file:

    2010-03-09 16:51:52.625 unknown:0x7fc6d6d2e700 
    [Init] <INFO> Shutdown complete. Exiting.
  • As an alternative to SHUTDOWN(), you can also temporarily set MaxClientSessions to 0 and then use CLOSE_ALL_SESSIONS(). New client connections cannot connect unless they connect using the dbadmin account. See CLOSE_ALL_SESSIONS for details.

Examples

The following command attempts to shut down the database. Because users are connected, the command fails:

=> SELECT SHUTDOWN('false');
NOTICE:  Cannot shut down while users are connected
          SHUTDOWN
-----------------------------
 Shutdown: aborting shutdown
(1 row)

SHUTDOWN() and SHUTDOWN('false') perform the same operation:

=> SELECT SHUTDOWN();
NOTICE:  Cannot shut down while users are connected
          SHUTDOWN
-----------------------------
 Shutdown: aborting shutdown
(1 row)

Using the 'true' parameter forces the database to shut down, even though clients might be connected:

=> SELECT SHUTDOWN('true');          
         SHUTDOWN
----------------------------
 Shutdown: moveout complete
(1 row)

See Also