diff --git a/content/en/docs/ToolandCommandReference/gs_ctl.md b/content/en/docs/ToolandCommandReference/gs_ctl.md index 7f26d42e28ec8c4aaed3ba5a01812b76331861dc..14609f6868a600500e4260501adf06c101f24eb4 100644 --- a/content/en/docs/ToolandCommandReference/gs_ctl.md +++ b/content/en/docs/ToolandCommandReference/gs_ctl.md @@ -4,10 +4,14 @@ **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. + +The **gs_ctl** utility is executed by the operating system user **omm**. - 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. +The **gs_ctl build** tool supports printing progress based on the ratio of the size of the files that have been transferred to the total size of the files that need to be transferred. + ## Parameter Description The **gs\_ctl** tool can use the following types of parameters: @@ -22,96 +26,114 @@ The **gs\_ctl** tool can use the following types of parameters: - Parameters for **member**. For details, see [Table 8](#table1055392110383). - Parameters for **changerole**. For details, see [Table 9](#table591372895218). - Parameters for **setrunmode**. For details, see [Table 10](#table1451519418810). +- Parameters for **stack**. For details, see [Table 11](#table14515194188888). +- Parameters for **copy**. For details, see [Table 12](#table1451519418811). +- Parameters for **resource pool build**. For details, see [Table 13](#table1451519418812). + +**Table 1** **option** parameters - **Table 1** **option** parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Parameter

-

Description

-

init[db]

-

Initializes a DN.

-

start

-

Starts a DN.

-

restart

-

Restarts a DN.

-

build

-

Rebuilds the instance on the node where the instance needs to be rebuilt.

-

stop

-

Stops a DN.

-

reload

-

Reloads the configuration files (postgresql.conf and pg_hba.conf).

-

status

-

Displays the DN running status.

-

failover

-

Promotes the standby DN to the primary DN when the primary DN is faulty.

-

After the switchover is successful, run the gs_om -t refreshconf command to record the information about the primary and standby servers. Ensure that the gs_om -t refreshconf command is executed successfully. Otherwise, the database status will be affected when the database is restarted.

-

switchover

-

When the primary/standby DN relationship is normal, and the standby DN is switched to the primary DN for maintenance purposes, data will not be lost during the switchover.

-

query

-

Queries the status between the primary and standby DNs.

-

notify

-

Specifies the primary/standby DNs after startup.

-

kill

-

Sends semaphore to a specified process.

-

querybuild

-

Checks the rebuild process of a DN.

-

finishredo

-

Forcibly stops redo.

-
CAUTION:

This parameter is a high-risk operation. Exercise caution when performing this operation.

-
-

copy

-

Copies Xlogs in the dual-center DR mode based on shared storage.

-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

+

Description

+

init[db]

+

Initializes a DN.

+

start

+

Starts a DN.

+

restart

+

Restarts a DN.

+

build

+

Rebuilds the instance on the node where the instance needs to be rebuilt.

+

stop

+

Stops a DN.

+

reload

+

Reloads the configuration files (postgresql.conf and pg_hba.conf).

+

status

+

Displays the DN running status.

+

failover

+

Promotes the standby DN to the primary DN when the primary DN is faulty.

+

After the switchover is successful, run the gs_om -t refreshconf command to record the information about the primary and standby servers. Ensure that the gs_om -t refreshconf command is executed successfully. Otherwise, the database status will be affected when the database is restarted.

+

switchover

+

When the primary/standby DN relationship is normal, and the standby DN is switched to the primary DN for maintenance purposes, data will not be lost during the switchover.

+

query

+

Queries the status between the primary and standby DNs.

+

notify

+

Specifies the primary/standby DNs after startup.

+

kill

+

Sends semaphore to a specified process.

+

querybuild

+

Checks the rebuild process of a DN.

+

finishredo

+

Forcibly stops redo.

+
CAUTION:

This parameter is a high-risk operation. Exercise caution when performing this operation.

+
+

copy

+

Copies Xlogs in the dual-center DR mode based on shared storage.

+

member

+

The management of member nodes.

+

changerole

+

Change the role of a node.

+

setrunmode

+

Set the running mode.

+
**Table 2** Common parameters @@ -201,13 +223,7 @@ The **gs\_ctl** tool can use the following types of parameters:

-

-

-L

- -

To query the validity of lsn:XX/XX and display max_lsn, run the following command:

- -

-

- - +

-P PASSWORD

Used together with the -U parameter and specifies the password of the user that connects to the local database.

@@ -226,6 +242,15 @@ The **gs\_ctl** tool can use the following types of parameters:

Default value: If this parameter is not specified, the current OS user is used.

+

-Z NODE-TYPE

+ +

Can be "single_node"

+
NOTE:

In a completely standalone scenario, if the wal_level is set to WAL_LEVEL_MINIMAL, or if max_wal_senders is less than 1, and the database is started in either primary/standby/pending mode, then the gs_ctl start command needs to include the -Z single_node parameter.

+
+ +

-

+ +

-?, -h, --help

Displays help information about gs_ctl command parameters.

@@ -364,11 +389,13 @@ The **gs\_ctl** tool can use the following types of parameters:

Default value: 120s

-

-d

+

-q

-

Prints more build process information.

+

After the rebuild is finished, whether to restart automatically.

+

In specified parameter scenarios, it does not restart automatically.

+

In unspecified scenarios, it restarts automatically. The default maximum waiting time for restart is 60 seconds. If the database fails to start successfully within this period, an error message will be displayed indicating that the system will no longer wait, and the command will exit. Subsequently, the status of the database startup can be confirmed using the `gs_om -t status --detail` command or other commands that check the database status.

-

-

+

-

-C CONNECTOR

@@ -449,6 +476,20 @@ The **gs\_ctl** tool can use the following types of parameters:

Set DATADIR as required.

+

-G

+ +

Sets the group number in a DCF.

+ +

Integer

+ + +

--priority

+ +

Sets the priority in a DCF.

+ +

Integer

+ + @@ -521,3 +562,121 @@ The **gs\_ctl** tool can use the following types of parameters: + +**Table 11** Parameters for stack + + + + + + + + + + + + + +

Parameter

+

Description

+

Value Range

+

-I

+

The lwtid used to specify the thread for which the call stack is to be obtained.

+

Positive integers.

+
+ +**Table 12** Parameters for copy + + + + + + + + + + + + + +

Parameter

+

Description

+

Value Range

+

-Q

+

Specify the direction of xlog copy.

+

+

  • copy_from_local:Copy from local to shared storage.
  • +
  • copy_from_share:Copy from shared storage to local storage.
  • +
  • force_copy_from_local:Force copy from local to shared storage.

+
+ +**Table 13** Parameters for resource pool build + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

+

Description

+

Value Range

+

-b MODE

+

Specify the mode of rebuilding the standby machine.

+

mode values:

+

  • cross_cluster_full:When performing a build with resource pooling, it must be integrated with the Dorado disaster recovery scenario. This parameter indicates that in the context of Dorado disaster recovery, the data directories of the host are re-synchronized through a full image approach.

    +

  • check:Determine whether a build is needed.

    +

    NOTE:Resource pooling builds are only applicable for cross-cluster builds between primary-backup clusters and cannot be used for builds within a single resource pooling cluster's primary-backup instances.

    + +
  • -q

    +

    Whether to restart automatically after the rebuild is finished.

    +

    In specified parameter scenarios, it does not restart automatically.

    +

    In unspecified scenarios, it restarts automatically. The default maximum waiting time for restart is 60 seconds. If the database fails to start successfully within this period, an error message will be displayed indicating that the system will no longer wait, and the command will exit. Subsequently, the status of the database startup can be confirmed using the `gs_om -t status --detail` command or other commands that check the database status.

    +

    -

    +

    --enable-dss

    +

    Turn on the resource pooling switch.

    +

    -

    +

    -g

    +

    Enable resource pooling and specify nodes for building.

    +

    Value range: integer, [0-63], starting from 0.

    +

    Default value: 0.

    +

    Note: The `-g` input parameter refers to the resource pooling node ID, which is the `ss_instance_id`.

    +

    --instance-id=instance_id

    +

    The ID number of the instance when DSS and DMS are enabled.

    +

    Positive integer.

    +

    --vgname

    +

    Volume group name.

    +

    Data type: string.

    +

    For example: a volume group "+ data" or two volume groups separated by ","connection"+data,+log".

    +

    --socketpath

    +

    The socket file path used by the DSS instance process.

    +

    The socket file path for the dss instance process.

    +
    \ No newline at end of file diff --git a/content/zh/docs/ToolandCommandReference/gs_ctl.md b/content/zh/docs/ToolandCommandReference/gs_ctl.md index 068185c6b38168a3940cfbe80522b9faf4235b5d..dd79d91da32c86e163b43eb59a2cbcfc22d49e7c 100644 --- a/content/zh/docs/ToolandCommandReference/gs_ctl.md +++ b/content/zh/docs/ToolandCommandReference/gs_ctl.md @@ -1,20 +1,20 @@ -# gs\_ctl +# gs_ctl ## 背景信息 -gs\_ctl是openGauss提供的数据库服务控制工具,可以用来启停数据库服务和查询数据库状态。主要供openGauss管理模块调用。 +gs_ctl是openGauss提供的数据库服务控制工具,可以用来启停数据库服务和查询数据库状态。主要供openGauss管理模块调用。 -gs\_ctl工具由操作系统用户omm执行。 +gs_ctl工具由操作系统用户omm执行。 - 启动、停止、重启openGauss节点。 - 在不停止数据库的情况下,重新加载配置文件(postgresql.conf,pg\_hba.conf)。 - 主备切换、主备状态查询、重建和重建状态查询。 -gs\_ctl build工具支持打印进度,根据已经传输完成的文件大小比上需要传输的总文件大小进行进度打印。 +gs_ctl build工具支持打印进度,根据已经传输完成的文件大小比上需要传输的总文件大小进行进度打印。 ## 参数说明 -gs\_ctl参数可分为如下几类: +gs_ctl参数可分为如下几类: - option参数,详细请参见[表1](#table145081017222)。 - 公共参数,详细请参见[表2](#zh-cn_topic_0287275989_zh-cn_topic_0237152408_zh-cn_topic_0059777628_t09253ddb2a8a4d4a8ba32b103310bb68)。 @@ -124,6 +124,21 @@ gs\_ctl参数可分为如下几类:

    基于共享存储的双中心容灾模式,进行xlog日志拷贝。

    +

    member

    + +

    对成员节点的管理。

    + + +

    changerole

    + +

    改变节点角色。

    + + +

    setrunmode

    + +

    设置运行模式。

    + + @@ -391,6 +406,14 @@ gs\_ctl参数可分为如下几类:

    无参数

    +

    -C CONNECTOR

    + +

    到源端DN的连接串,通过连接源端DN进行本节点上DN的重建。只支持备机到备机的连接。

    + +

    连接串包含本节点待重建DN的IP和端口和源端DN的IP和端口,格式如下:

    +
    'localhost=Local DN IP localport=Local DN Port+1 remotehost=DN IP remoteport=DN Port+1'
    + + @@ -462,6 +485,24 @@ gs\_ctl参数可分为如下几类:

    DATADIR的取值:用户自定义。

    +<<<<<<< HEAD + +

    -G

    + +

    用于设置DCF中的组号。

    + +

    整型。

    + + +

    --priority

    + +

    用于设置DCF中的优先级。

    + +

    整型。

    + + +======= +>>>>>>> parent of 6d7a36a2f (新增部分参数的描述介绍。) @@ -631,6 +672,13 @@ gs\_ctl参数可分为如下几类:

    默认值:0

    提示:-g入参参数是指资源池化节点id参数ss_instance_id

    +

    --instance-id=instance_id

    + +

    启用dss和dms时,实例的ID号。

    + +

    正整数。

    + +

    --vgname

    卷组名。