Quick onboard
Deployment
Data Modeling
Connecting
Migration
Query
Operations and Maintenance
Common Maintenance
Partition
Backup and Restore
Expansion
Mirroring
Resource Management
Security
Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool guide
Data type
Storage Engine
Executor
Stream
DR (Disaster Recovery)
Configuration
Index
Extension
SQL Reference
This document describes the steps to uninstall and reinstall YMatrix 6. The example uses a three-node cluster: the master node is mdw, and the two segment nodes are sdw1 and sdw2.
Before proceeding, please read the following instructions carefully:
Note!
Sections 1 and 2 are independent. Choose one based on your needs. Do not execute both!
First, prepare for uninstallation or reinstallation. This step is required; otherwise, the uninstall process may fail. Use the meta-command \q to exit the psql terminal.
postgres=# \q
On the master host, run the mxdeletesystem command to remove the database instance and all data:
$ mxdeletesystem -a
Note!
Commands in this document are given for CentOS 7. If you are using CentOS 8, replaceyumwithdnf. For Ubuntu systems, replaceyumwithapt.
First, query the installed package name using the following command:
[<username>@mdw ~]$ yum list installed | grep matrixdb
matrixdb6.x86_64 6.0.0+enterprise~beta.5-1.el7 installed
Note!
On Ubuntu 20.04, usedpkg -l | grep matrixdbto check the installed package name.
Then, uninstall the package. This step completely removes the YMatrix software and must be performed as a regular user with sudo privileges or as the root user on all nodes.
[<username>@mdw ~]$ sudo yum remove -y matrixdb6.x86_64
#or
[<username>@mdw ~]$ sudo yum erase -y matrixdb6.x86_64
You can safely use this section. Reinstalling a newer or the same version within YMatrix 6 does not result in data loss. For example, upgrading from YMatrix 6.1 to 6.2, or uninstalling and reinstalling YMatrix 6.2.
First, stop the cluster. This preparation step is necessary; otherwise, the reinstallation may fail.
Use the meta-command \q to exit the psql terminal.
postgres=# \q
In this example, the cluster is stopped using the fast mode. You may alternatively use smart or immediate mode. The table below explains the differences.
[mxadmin@mdw ~]$ mxstop -a -M fast
| mxstop Mode | Parameter | Reject New Connections | Wait for Active Processes to Finish | Is 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 |
Perform the steps described in section "1.2 Uninstall YMatrix". This removes the previously installed version of the YMatrix software.
Note!
If you are using CentOS 8, replaceyumwithdnf. On Ubuntu systems, replaceyumwithapt.
Reinstall the desired version of the RPM package. Run this as a regular user with sudo privileges.
[<username>@mdw ~]$ sudo yum install -y matrixdb-6.0.0+community-1.el7.x86_64.rpm
After reinstallation, switch to the mxadmin user using sudo:
[<username>@mdw ~]$ sudo su - mxadmin
Then, start the cluster using the mxstart utility:
[mxadmin@mdw ~]$ mxstart -a
Once the cluster starts successfully, the web interface will also become available.