Routine Management

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

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

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

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


1 Command-Line Tools

1.1 Start the Cluster

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

[mxadmin@mdw ~]$ mxstart -a

1.2 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, roll back transactions No
immediate -M immediate Yes No, kill processes immediately No
[mxadmin@mdw ~]$ mxstop -a -M fast

Choose one mode to stop the cluster. In most cases, the fast mode is recommended. If no mode is specified (mxstop -a), the system defaults to smart mode, allowing current operations to complete naturally, though this may take longer. This blocking operation does not affect existing usage of the cluster, but prevents new connections from being established.

1.2.1 Restart the Cluster

Use mxstop -ar to restart the cluster.

1.2.2 Reload Authorization Configuration

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

1.3 Check Cluster Status

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

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

1.4 Modify Cluster Configuration

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

1.4.1 View Configuration

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

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

1.4.2 Change 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

Typically, you might query system catalogs such as pg_database and pg_class to retrieve cluster metadata.
To make viewing this information easier and more intuitive—such as databases, tables, table sizes, types, access times, etc.—YMatrix provides a graphical web interface. With simple clicks, you can quickly obtain the required information.

2.1 Prerequisites

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

http://<IP>:8240

2.2 Cluster Management

2.2.1 Metrics View

After logging in, you enter the "Cluster Management" page, which displays the "Metrics View" by default. It consists of two sections:

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

2.2.2 Instance View

Switch to the "Instance View". Node information changes from metrics to instance status and distribution.

Hover over any instance to view its detailed information.

2.2.3 List View

Switch to the "List View" to display node information in tabular format, including instance status, DBID, port, storage path, etc.

2.3 Table Information

2.3.1 Basic Table Information

Click the "Tables" option on the left to go to the table page. All databases are displayed:

You can also select a specific database from the list:

A list of all tables in the selected database appears, showing statistics such as table name, database name, schema, number of partitions, size, owner, estimated row count, last access time, last modification time, and last statistics update time.

2.3.2 Detailed Table Information

Click on a specific table to view its detailed information.
The detail page has two sections: Basic Info and Structure Info.

Basic information is similar to what is shown in the list view. Below is statistical data:

Table structure:

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

With these two views, you can gain comprehensive insights into table-level information for effective cluster management and maintenance.