Quick Start
Simulate Time Series Scenarios
Standard Cluster Deployment
Data Modeling
Connecting to The database
Data Writing
Data Migration
Data Query
Scene Application Examples
Federal Query
Maintenance and Monitoring
Global Maintenance
Partition Maintenance
Backup and Restore
Cluster Expansion
Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool Guide
Data Type
Storage Engine
Execution Engine
Configuration Parameters
SQL Reference
FAQ
This document will introduce YMatrix's daily operation and maintenance management tools, mainly in the following two parts:
Notes!
Command line tools are controlled through the master node, so they must be executed on the Master node.
YMatrix 5 launches a brand new database architecture. Under this architecture, we provide the latest cluster operation and maintenance tools: mxstart, mxstop, mxstate. For more information about the new YMatrix 5 architecture, please see YMatirx Architecture.
Notes!
YMatrix 5 uses the new operation and maintenance tool to manage the cluster by default, and YMatrix 4 (MatrixDB 4) still uses the Greenplum series operation and maintenance tool by default. For details, please see YMatrix 4 Cluster Basic Management.
The mxstart -a command can start the YMatrix cluster.
[mxadmin@mdw ~]$ mxstart -a
The mxstop -a command is used to stop a running YMatrix cluster.
| mxstop mode | parameters | disable new connection | wait for the process to run | Is it the default mode |
|---|---|---|---|---|
| smart | -M smart | Yes | Yes | |
| fast | -M fast | Yes | No, interrupted connection, transaction rollback | No |
| immediate | -M immediate | Yes | No, kill the process directly | No |
[mxadmin@mdw ~]$ mxstop -a -M fast
Please select a mode to stop the cluster. For most cases of YMatrix clusters, using fast mode is the best way to do it. If you do not select mode (mxstop -a), the smart mode is enabled for you by default to ensure that the operations you are doing can be completed naturally, but may wait for a long time. Blocking of this command will not affect the use of the cluster, but the cluster cannot create new connections.
mxstop -ar can restart the cluster.
After modifying the pg_hba.conf authorization configuration, you need to call mxstop -u to reload the authorization configuration.
mxstate can view the running status of the cluster, including:
[mxadmin@mdw ~]$ mxstate
gpconfig is used to view or modify configuration parameters in the configuration file postgresql.conf.
You can view the configuration by adding the configuration name:
[mxadmin@mdw ~]$ gpconfig -s shared_buffers
Values on all segments are consistent
GUC : shared_buffers
Master value: 1078464kB
Segment value: 1078464kB
Modify the configuration via gpconfig -c {config name} -v {value}:
[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'
After modifying the configuration, you must restart the cluster before it can take effect:
[mxadmin@mdw ~]$ mxstop -ar
After restarting, check the configuration:
[mxadmin@mdw ~]$ gpconfig -s shared_buffers
Values on all segments are consistent
GUC : shared_buffers
Master value: 128MB
Segment value: 128MB
Notes!
For details of gpconfig, please refer to gpconfig
Normally, you may get cluster meta information through system tables such as pg_database, pg_class.
To view this information more conveniently and intuitively (databases, data tables, and each table size, type, access time, etc.), YMatrix provides a graphical work page that can be easily clicked to get what you need.
First, you need to log in to the graphical interface. Enter the IP of the machine where the graphical interface MXUI process is located (the default is the IP of Master) and the port number:
http://<IP>:8240
After successfully logging in, enter the "Cluster Management" page, and the "Metrics View" is displayed by default, including 2 parts:

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

Hover over any instance to view its detailed information.

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

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.
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:

You can have a detailed understanding of the data table information through the above two pages to manage and operate the cluster.