gs_ctl
Function
gs_ctl is a tool provided by openGauss for controlling database services. It can be used to start or stop a database and to query the database status. It is invoked by the database management module.
- Start, stop, and restart the openGauss node.
- Reload the configuration files (postgresql.conf and pg_hba.conf) without stopping the database.
- Perform primary/standby switchover, query primary/standby status, DN rebuild the database instance, and query the rebuilding status.
Parameter Description
The gs_ctl tool can use the following types of parameters:
-
option parameters. For details, see Table 1.
-
Common parameters. For details, see Table 2.
-
start and restart parameters. For details, see Table 3.
-
stop and restart parameters. For details, see Table 4.
-
switchover parameters. For details, see Table 5.
-
build parameters. For details, see Table 6.
-
Parameters for copy. For details, see Table 7.
Table 1 option parameters
Table 2 Common parameters
Table 3 start and restart common parameters
The value of FILENAME is a file that the user who starts the database service has the permission to operate. |
||
Specifies the gaussdb command options to be transferred and executed by openGauss. The options should usually be surrounded by single or double quotation marks to ensure that they are passed through as a whole. |
Parameters supported by gaussdb |
|
By default, the gaussdb executable is taken from the same directory as gs_ctl. In most cases, it is not necessary to use this option. |
Table 4 stop and restart common parameters
Table 5 switchover parameters
Table 6 build parameters
Table 7 copy parameters