Routine Management

This document introduces the routine operations and management tools for YMatrix, which are divided into the following two parts:

  • Use command-line tools to start or stop the cluster, check cluster status, modify configurations, etc.
  • Use the graphical interface to start or stop the cluster and monitor its status.

Note!
All command-line tools are controlled through the master node (Master). Therefore, they must be executed on the Master node.

YMatrix 6 uses the same cluster management tools as YMatrix 5. We provide the following operational utilities: mxstart, mxstop, and mxstate.

Note!
YMatrix 4 (MatrixDB 4) still uses Greenplum series tools by default. For details, see YMatrix 4 Cluster Basic Management.


1 Command-Line Tools

Start the Cluster

Use the mxstart -a command to start a YMatrix cluster.

[mxadmin@mdw ~]$ mxstart -a

Stop the Cluster

The mxstop -a command stops a running YMatrix cluster.

mxstop Mode Parameter Reject New Connections Wait for Active Processes Default Mode
smart -M smart Yes Yes Yes
fast -M fast Yes No, terminate connections with transaction rollback No
immediate -M immediate Yes No, kill processes immediately No
[mxadmin@mdw ~]$ mxstop -a -M fast

Select one mode to stop the cluster. For most YMatrix scenarios, the fast mode is recommended. If no mode is specified (mxstop -a), the system defaults to smart mode, allowing current operations to complete naturally. However, this may take longer. The command being blocked does not affect ongoing usage of the cluster, but no new connections can be established.

Restart the Cluster

Use mxstop -ar to restart the cluster.

Reload Authorization Configuration

After modifying the pg_hba.conf authorization configuration, run mxstop -u to reload it.

Check Cluster Status

Use mxstate to view the cluster's operational status, including:

  • Master configuration information.
  • Segment configuration information.
  • Mirror node information.
[mxadmin@mdw ~]$ mxstate

Modify Cluster Configuration

Use gpconfig to view or modify parameters in the configuration file postgresql.conf.

View Configuration

Use gpconfig -s followed by the parameter name to display its value:

[mxadmin@mdw ~]$ gpconfig -s shared_buffers
Values on all segments are consistent
GUC          : shared_buffers
Master  value: 1078464kB
Segment value: 1078464kB

Modify Configuration

Use gpconfig -c {configuration_name} -v {value} to change a configuration parameter:

[mxadmin@mdw ~]$ gpconfig -c shared_buffers -v 128MB
20210723:17:13:35:004318 gpconfig:sdw2:mxadmin-[INFO]:-completed successfully with parameters '-c shared_buffers -v 128MB'

Restart the cluster for changes to take effect:

[mxadmin@mdw ~]$ mxstop -ar

After restarting, verify the updated setting:

[mxadmin@mdw ~]$ gpconfig -s shared_buffers
Values on all segments are consistent
GUC          : shared_buffers
Master  value: 128MB
Segment value: 128MB

Note!
For detailed usage of gpconfig, refer to gpconfig.


2 Graphical Interface

YMatrix provides a graphical user interface (MXUI) that allows you to perform common tasks with simple clicks.

First, log in to the MXUI. Open your browser and enter the IP address (by default, the Master's IP) and port number where the MXUI service runs:

http://<IP>:8240

2.1 Start the Cluster

  • Log in to MatrixUI and go to the Cluster page. The database cluster status shows "Stopped".

  • Click the Operations button at the top-right corner and select Start Database, navigating to the startup homepage.

  • On the startup page, click the Start database button. A confirmation dialog appears. Click OK to begin starting the database cluster.

  • After the database starts successfully, click Done to return to the Cluster page.

2.2 Stop the Cluster

  • Log in to the UI and open the Cluster Management page. The database cluster is running normally.

  • Click the Operations button at the top-right corner and select Stop database, entering the shutdown homepage.

    You can choose among three shutdown modes: Fast, Immediate, and Conservative.

Fast Mode (Recommended for Routine Maintenance)

  • Read the description carefully. Select Fast Mode, then click Stop database. Confirm in the pop-up dialog by clicking OK. The system will stop the cluster using fast mode.

Immediate Mode (For Emergency Maintenance)

  • Read the description carefully. Select Immediate Mode, click Stop datebase, and confirm with OK in the pop-up. The system stops the cluster immediately.

Conservative Mode (Not Recommended)

  • Read the description carefully. Select Smart Mode, click Stop database, and confirm with OK. The system stops the cluster in smart mode.

2.3 View Cluster Status

Metrics View

After logging in, the default Metrics View on the Cluster Management page includes two sections:

  1. Cluster Information: Displays cluster status, number of data nodes, and database version.
  2. Metrics Information: Shows resource usage such as active connections, CPU utilization, memory usage, disk I/O, network I/O, connection count, and disk I/O Utilization. YMatrix automatically collects metrics every 5 seconds.

Instance View

Switch to Instance View to see instance status and distribution across nodes.

Hover over any instance to view its detailed information.

List View

Switch to List View to see node details in tabular format, including instance status, DBID, port, and storage path.

2.4 Table Information

Basic Table Information

Click Tables on the left sidebar to access the table list, showing all databases:

You can also select a specific database from the dropdown:

A list of all tables in the selected database is displayed, including: table name, database name, schema, number of partitions, size, owner, estimated row count, last accessed time, last modified time, and last statistics update time.

Detailed Table Information

Click a specific table to view its detailed information.

The detail page has two sections: Basic Info and Structure.

Basic Info displays similar content as the list view, with additional statistics below:

Table Structure:

For partitioned tables, you can view detailed information for each partition:

These views provide comprehensive insights into table-level data, supporting effective cluster management and maintenance.