MatrixDB 4 small version upgrade

Small version upgrade refers to upgrading to a new version under the premise that the main version number remains unchanged. For example: upgrade from 4.0.0 to 4.0.2; upgrade from 4.0.0 to 4.1.0.

Below, take the example of upgrading from MatrixDB 4.0.0 to 4.4.0 to introduce detailed steps. In the example, the master node name is mdw.

1. Get the latest installation package

Obtain the 4.4.0 installation package, matrixdb-4.4.0-1.el7.x86_64.rpm from the official website, and copy it to all nodes.

2. Stop the cluster

Switch to mxadmin user.

[<username>@mdw ~]$ sudo su - mxadmin

Stop the cluster.

[mxadmin@mdw ~]$ gpstop -af

3. Execute update commands on all nodes

Upgrade the rpm package using root permissions:

[<username>@mdw ~]$ sudo yum upgrade matrixdb-4.4.0-1.el7.x86_64.rpm

Notes!
Do not use yum erase, otherwise the configuration of the previous version will be deleted.

4. Restart the service

[<username>@mdw ~]$ sudo systemctl restart matrixdb.supervisor.service

5. Modify the configuration and restart the cluster (4.3.10 and later versions can be skipped)

Log in to the master host and switch to the mxadmin user.

[<username>@mdw ~]$ sudo su - mxadmin

Start the cluster first, add the MARS plug-in to the shared_preload_libraries configuration and restart.

[mxadmin@mdw ~]$ gpstart -a
[mxadmin@mdw ~]$ gpconfig -c shared_preload_libraries -v "matrixts,matrixmgr,matrixgate,telemetry,mars"
[mxadmin@mdw ~]$ gpstop -arf

Notes!
The value of shared_preload_libraries needs to be added to MARS based on the original configuration.

6. Upgrade plug-in

If you use the matrixts plug-in and MARS plug-in, connect to the database and upgrade using the following SQL commands:

postgres=# ALTER EXTENSION matrixts UPDATE;
postgres=# ALTER EXTENSION mars UPDATE;

If you use Grafana monitoring, log in to the matrixmgr database, upgrade the matrixmgr plug-in, and reset the acquisition task:

[mxadmin@mdw ~]$ psql -d matrixmgr

matrixmgr=# ALTER EXTENSION matrixmgr UPDATE;
matrixmgr=# SELECT mxmgr_remove_all('local');
matrixmgr=# SELECT mxmgr_deploy('local');

Notes!
4.5.2 and then there is no need to upgrade the matrixmgr plug-in. 4.6.0 and no need to upgrade the mars plug-in again.