Hot Patch Update
Scenarios
You can install a hot patch for your GaussDB instance to rectify product issues. A hot patch can be loaded without interrupting services and can be used to resolve some emergent database kernel problems online without affecting services. Hot patch update supports manual rollback.
Precautions
- During the update, hot patch packages will be downloaded and decompressed, which occupies certain disk space. It is recommended that the disk usage on the DN be less than or equal to the disk usage threshold minus 10%.
To check the current DN disk usage, go to the metric monitoring page on the management console.
To obtain the disk usage threshold, contact technical support.
- Version upgrade is unavailable if instance nodes are in an abnormal state.
- If a hot patch conflicts with the backup, the differential backup and full backup of the instance will be stopped during hot patch installation.
- During an upgrade or rollback, the following operations cannot be performed: scaling up storage, changing specifications, backing up data, resetting passwords, rebooting instances, and deleting instances.
- You are advised to perform an upgrade during off-peak hours because there are more idle CPU, disk, and memory resources.
- Hot patch update is available only when there is a hot patch for installation. If no hot patch is available, hot patch update is not displayed.
- Hot patch update and rollback can be performed in batches for different patch versions of a single instance. During the update, hot patches are installed in ascending order of version numbers. During the rollback, hot patches are rolled back in descending order of version numbers.
- If the upgrade fails, the system automatically rolls back the instance to the source version. You can contact Huawei Cloud technical support, and Huawei Cloud engineers will help you upgrade the instance if necessary.
- After the upgrade is complete, you can manually roll back the upgrade.
- A maximum of 30 instances can be selected at a time for batch upgrade.
- GaussDB can also automatically install hot patches for an instance after the instance is created or after a cold patch is installed for it. You can submit a service ticket to request this function at Service Tickets > Create Service Ticket in the upper right corner of the management console. Note that automatic hot patch update is not supported for new instances created using backups of existing instances.
Procedure
Rollback Operations
If a rollback is required after the upgrade, perform the following operations to roll back an instance to the source version.
After the upgrade is rolled back, you can perform the upgrade again. If the problem persists, contact Huawei Cloud technical support, and Huawei Cloud engineers will help you upgrade the instance if necessary.
- In the Upgrade Instance dialog box, select Hot patch for Upgrade Method.
- Select Rollback for Action.
- Select the target version, enter YES, and click OK.
- On the Instances page, check the rollback status. After the rollback is complete, the instance status becomes Available.
- On the Instances page, click the name of the target instance. On the Basic Information page that is displayed, check that the target versions are not displayed in the Upgraded Hot Patch Version and Upgraded Kernel Hot Patch Version fields in the Configuration area.
- Check that the instance is properly connected and you can add, delete, update, and query data in the instance.
- Log in to the database. For details, see Connecting to an Instance Through DAS.
- Go to the SQL Query page.
Figure 7 SQL query
- Create a database.
CREATE DATABASE database_name;
In this example, run the following command to create a database named db_tpcds:
CREATE DATABASE db_tpcds;
Switch to the newly created database in the upper left corner.
Figure 8 Switching to the new database
- Create a table and add, delete, update, and query data in the table.
- Create a schema.
- Create a table named mytable that has only one column. The column name is firstcol and the column type is integer.
CREATE TABLE myschema.mytable (firstcol int);
- Insert data into the table.
- View the data in the table.
SELECT * FROM myschema.mytable;
| firstcol | ---+----------+ 1 | 100 |
- Update data in the table.
- View the data in the table again.
SELECT * FROM myschema.mytable;
| firstcol | ---+----------+ 1 | 200 |
- Delete the table.
- On the Instances page, select the target instances and click Batch Upgrade.
- In the Batch Upgrade dialog box, select Hot patch for Upgrade Method and Rollback for Action, select a target version, enter YES, and click OK.
- On the Instances page, check the rollback status. After the rollback is complete, the instance status becomes Available.
- On the Instances page, click the name of the target instance. On the Basic Information page that is displayed, check that the target versions are not displayed in the Upgraded Hot Patch Version and Upgraded Kernel Hot Patch Version fields in the Configuration area.
- Check that the instance is properly connected and you can add, delete, update, and query data in the instance.
- Log in to the database. For details, see Connecting to an Instance Through DAS.
- Go to the SQL Query page.
Figure 9 SQL query
- Create a database.
CREATE DATABASE database_name;
In this example, run the following command to create a database named db_tpcds:
CREATE DATABASE db_tpcds;
Switch to the newly created database in the upper left corner.
Figure 10 Switching to the new database
- Create a table and add, delete, update, and query data in the table.
- Create a schema.
- Create a table named mytable that has only one column. The column name is firstcol and the column type is integer.
CREATE TABLE myschema.mytable (firstcol int);
- Insert data into the table.
- View the data in the table.
SELECT * FROM myschema.mytable;
| firstcol | ---+----------+ 1 | 100 |
- Update data in the table.
- View the data in the table again.
SELECT * FROM myschema.mytable;
| firstcol | ---+----------+ 1 | 200 |
- Delete the table.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot