Updated on 2024-06-03 GMT+08:00

SHUTDOWN

Function

SHUTDOWN shuts down the currently connected database node.

Precautions

  • Only an administrator can run this command.
  • The distributed database does not support the SHUTDOWN command.

Syntax

SHUTDOWN [FAST | IMMEDIATE];

Parameter Description

  • FAST | IMMEDIATE

    FAST: Rolls back all active transactions, forcibly disconnects the client, and shuts down the database node without waiting for the client to disconnect.

    IMMEDIATE: Shuts down the server forcibly. Fault recovery will occur on the next startup.

    If the shutdown mode is not specified, the default value FAST is used.

Examples

-- Shut down the current database node.
gaussdb=# SHUTDOWN;

-- Shut down the current database node in fast mode.
gaussdb=# SHUTDOWN FAST;