diff --git a/product/en/docs-mogdb/v1.1/reference-guide/sql-syntax/CREATE-DATABASE.md b/product/en/docs-mogdb/v1.1/reference-guide/sql-syntax/CREATE-DATABASE.md
index 4459f57a2f532100338fe87e7122f38304e9eac8..f5e902c73d934bf3383e4470b8d3e74322ffcf52 100644
--- a/product/en/docs-mogdb/v1.1/reference-guide/sql-syntax/CREATE-DATABASE.md
+++ b/product/en/docs-mogdb/v1.1/reference-guide/sql-syntax/CREATE-DATABASE.md
@@ -80,9 +80,9 @@ CREATE DATABASE database_name
- **DBCOMPATIBILITY [ = ] compatibilty_type**
- Specifies the type of the compatible database.
+ Specifies the compatible database type. The default compatible database is Oracle.
- Value range: A, B, C, and PG, indicating **O**, **MY**, **TD** and **POSTGRES** databases, respectively.
+ Value range: **A**, **B** and **PG**, indicating Oracle, MySQL and Postgres databases, respectively.
>  **NOTE:** When **DBCOMPATIBILITY** is set to **A**, an empty string is considered as **NULL**.
diff --git a/product/en/docs-mogdb/v3.1/reference-guide/sql-syntax/CREATE-DATABASE.md b/product/en/docs-mogdb/v3.1/reference-guide/sql-syntax/CREATE-DATABASE.md
index eba7ea62b5fa188124c144bcd6e8f051b01c2053..23a5e1919026f420f37622e6c992e3aa8a20fafd 100644
--- a/product/en/docs-mogdb/v3.1/reference-guide/sql-syntax/CREATE-DATABASE.md
+++ b/product/en/docs-mogdb/v3.1/reference-guide/sql-syntax/CREATE-DATABASE.md
@@ -136,7 +136,7 @@ CreateDatabase ::= CREATE DATABASE [IF NOT EXISTS] database_name
- **DBCOMPATIBILITY [ = ] compatibility_type**
- Specifies the compatible database type. The default value is **O**.
+ Specifies the compatible database type. The default compatible database is Oracle.
Value range: **A**, **B** and **PG**, indicating Oracle, MySQL and Postgres databases, respectively.
diff --git a/product/en/docs-mogdb/v5.0/_index.md b/product/en/docs-mogdb/v5.0/_index.md
index 7f262a2a665f0d324f4f002cd3dbe7e4deada514..176d62e2c03e21f062939cccf008fdb00f84bcb9 100644
--- a/product/en/docs-mogdb/v5.0/_index.md
+++ b/product/en/docs-mogdb/v5.0/_index.md
@@ -47,7 +47,7 @@ date: 2022-08-07
[Backup and Restoration](./administrator-guide/backup-and-restoration/backup-and-restoration.md)
-[Upgrade Guide](./administrator-guide/upgrade-guide.md)
+[Upgrade Guide](./upgrade-guide/upgrade-guide.md)
[Common Fault Locating Methods](./common-faults-and-identification/common-fault-locating-methods.md)
diff --git a/product/en/docs-mogdb/v5.0/administrator-guide/administrator-guide.md b/product/en/docs-mogdb/v5.0/administrator-guide/administrator-guide.md
index b88fa5698dbaf79b5cb8f661632f8a5cffc69b0e..4eedb25b088e408280f0beb369f552f230b0feb0 100644
--- a/product/en/docs-mogdb/v5.0/administrator-guide/administrator-guide.md
+++ b/product/en/docs-mogdb/v5.0/administrator-guide/administrator-guide.md
@@ -1,18 +1,17 @@
----
-title: Administrator Guide
-summary: Administrator Guide
-author: Guo Huan
-date: 2023-05-22
----
-
-# Administrator Guide
-
-- **[Localization](localization/localization.md)**
-- **[Routine Maintenance](routine-maintenance/routine-maintenance.md)**
-- **[Primary and Standby Management](primary-and-standby-management.md)**
-- **[MOT](mot-engine/mot-engine.md)**
-- **[Column-store Tables Management](column-store-tables-management.md)**
-- **[Backup and Restoration](backup-and-restoration/backup-and-restoration.md)**
-- **[Database Deployment Solutions](database-deployment-scenario/database-deployment-scenario.md)**
-- **[Importing And Exporting Data](importing-and-exporting-data/importing-and-exporting-data.md)**
-- **[Upgrade Guide](upgrade-guide.md)**
\ No newline at end of file
+---
+title: Administrator Guide
+summary: Administrator Guide
+author: Guo Huan
+date: 2023-05-22
+---
+
+# Administrator Guide
+
+- **[Localization](localization/localization.md)**
+- **[Routine Maintenance](routine-maintenance/routine-maintenance.md)**
+- **[Primary and Standby Management](primary-and-standby-management.md)**
+- **[MOT](mot-engine/mot-engine.md)**
+- **[Column-store Tables Management](column-store-tables-management.md)**
+- **[Backup and Restoration](backup-and-restoration/backup-and-restoration.md)**
+- **[Database Deployment Solutions](database-deployment-scenario/database-deployment-scenario.md)**
+- **[Importing And Exporting Data](importing-and-exporting-data/importing-and-exporting-data.md)**
\ No newline at end of file
diff --git a/product/en/docs-mogdb/v5.0/administrator-guide/upgrade-guide.md b/product/en/docs-mogdb/v5.0/administrator-guide/upgrade-guide.md
deleted file mode 100644
index 9153919cfd0b927b91d014f1065b59422221333c..0000000000000000000000000000000000000000
--- a/product/en/docs-mogdb/v5.0/administrator-guide/upgrade-guide.md
+++ /dev/null
@@ -1,375 +0,0 @@
----
-title: Upgrade Guide
-summary: Upgrade Guide
-author: Zhang Cuiping
-date: 2021-09-27
----
-
-# Upgrade Guide
-
-## Overview
-
-This document provides guidance on version upgrade and rollback process. It also offers common problem resolving and troubleshooting methods.
-
-## Intended Audience
-
-This document is mainly intended for upgrade operators. They must have the following experience and skills:
-
-- Be familiar with the networking of the current network and versions of related NEs (network elements).
-- Have maintenance experience of the related devices and be familiar with their operation and maintenance methods.
-
-## Upgrade Scheme
-
-This section provides guidance on selection of the upgrade modes.
-
-The user determines whether to upgrade the current system according to the new features of MogDB and database situations.
-
-The supported upgrade modes include in-place upgrade and gray upgrade. The upgrade strategies include major upgrade and minor upgrade.
-
-After the upgrade mode is determined, the system will automatically determine and choose the suitable upgrade strategy.
-
-* In-place upgrade: All services need to be stopped during the upgrade. All nodes are upgraded at a time.
-
-* Gray upgrade: supports full-service operations. All nodes are also upgraded at a time. (Currently, only the gray upgrade from version 1.1.0 to 2.0 and above is supported.)
-
-## Version Requirements Before the Upgrade (Upgrade Path)
-
-[Table 1](#biaoyi) lists the MogDB upgrade version requirements.
-
-**Table 1** Version requirements before the upgrade (upgrade path)
-
-| Version | Description |
-| --------- | ------------------------------------------------------- |
-| MogDB 2.0 | Need to upgrade to MogDB 2.1, then upgrade to MogDB 3.0 |
-| MogDB 2.1 | Upgradeable to MogDB 3.0 |
-
->  **NOTE:** You can run the following command to check the version before the upgrade:
->
-> ```bash
-> gsql -V | --version
-> ```
-
-## Impact and Constraints
-
-The following precautions need to be considered during the upgrade:
-
-- The upgrade cannot be performed with capacity expansion and reduction concurrently.
-- VIP (virtual IP) is not supported.
-- During the upgrade, you are not allowed to modify the **wal_level**, **max_connections**, **max_prepared_transactions**, and **max_locks_per_transaction** GUC parameters. Otherwise, the instance will be started abnormally after rollback.
-- It is recommended that the upgrade is performed when the database system is under the light workload. You can determine the off-peak hours according to your experience, such as holidays and festivals.
-- Before the upgrade, make sure that the database is normal. You can run the **gs_om -t status** command to check the database status. If the returned value of **cluster_state** is **Normal**, the database is normal.
-- Before the upgrade, make sure that mutual trust is established between database nodes. You can run the **ssh hostname** command on any node to connect to another node to verify whether the mutual trust has been established. If mutual connection between any two nodes does not require a password, the mutual trust is normal. (Generally, when the database status is normal, mutual trust is normal.)
-- Before and after the upgrade, the database deployment mode must be kept consistent. Before the upgrade, the database deployment mode will be verified. If it is changed after the upgrade, an error will occur.
-- Before the upgrade, make sure that the OS is normal. You can check the OS status using the **gs_checkos** tool.
-- In-place upgrade requires stopping of services. Gray upgrade supports full-service operations.
-- The database is running normally and the data of the primary domain name (DN) is fully synchronized to the standby DN.
-- During the upgrade, the kerberos is not allowed to be enabled.
-- You are not allowed to modify the **version.cfg** file decompressed from the installation package.
-- During the upgrade, if an error causes upgrade failure, you need to perform rollback operations manually. The next upgrade can be performed only after the rollback is successful.
-- After the rollback, if the next upgrade is successful, GUC parameters set before the upgrade is submitted will become invalid.
-- During the upgrade, you are not allowed to set GUC parameters manually.
-- During the gray upgrade, service interruption will occur and lasts less than 10s.
-- During the upgrade, OM operations can be performed only when the kernel and OM versions are consistent. This consistency refers that the kernel code and OM code are from the same software package. If the pre-installation script of the installation package is executed but the upgrade is not performed, or the pre-installation script of the baseline package after the rollback is not performed, the kernel code will be inconsistent with the OM code.
-- During the upgrade, if new fields are added to a system table but they cannot be found by running the **\d** command after the upgrade, you can run the **select** command to check the new fields.
-- The upgrade is allowed only when the value of **enable_stream_replication** is **on**.
-- During the gray upgrade, the number of concurrent read/write services must be less than 200.
-- If the MOT is used in MogDB 1.1.0, MogDB 1.1.0 cannot be upgraded to MogDB 2.0.
-
-## Upgrade Process
-
-This section describes the upgrade process.
-
-**Figure 1** Upgrade process
-
-
-
-> **NOTE:** The time listed in the following table is for reference only. The actual time required depends on the upgrade environment.
-
-**Table 2** Estimated upgrade efficiency
-
-
Procedure | Recommended Start Time | Time Required (Day/Hour/Minute) | Service Interruption Time | Remarks |
Perform the pre-upgrade preparations and check operations. | One day before the upgrade | About 2 to 3 hours | No impact on services | Pre-upgrade check, data backup, and software package verification |
Perform the upgrade. | Off-peak hours | The time is mainly spent in starting and stopping the database and modifying the system table of each database. The upgrade usually takes less than 30 minutes. | The service interruption time is the same as the upgrade time. Generally, the time taken is not greater than 30 minutes. | Performed based on the Upgrade Guide |
Verify the upgrade. | Off-peak hours | About 30 minutes | The service interruption time is the same as the upgrade verification time, about 30 minutes. | - |
Submit the upgrade. | Off-peak hours | The upgrade submission usually takes less than 10 minutes. | The service interruption time is the same as the upgrade submission time. Generally, the time taken is not greater than 10 minutes. | - |
Roll back the upgrade. | Off-peak hours | The rollback usually takes less than 30 minutes. | The service interruption time is the same as the rollback time. Generally, the time taken is not greater than 30 minutes. | - |
-
-## Pre-Upgrade Preparations and Check
-
-### Pre-Upgrade Preparations and Checklist
-
-**Table 3** Pre-upgrade preparations and checklist
-
- No. | Item to Be Prepared for the Upgrade | Preparation Content | Recommended Start Time | Time Required (Day/Hour/Minute) |
1 | Collect node information. | Obtain the name, IP address, and passwords of users root and omm of related database nodes | One day before the upgrade | 1 hour |
2 | Set remote login as user root. | Set the configuration file that allows remote login as user root | One day before the upgrade | 2 hours |
3 | Back up data. | For details, see the Backup and Restoration section in the Administrator Guide. | One day before the upgrade | The time taken varies depends on the volume of data to be backed up and the backup strategy. |
4 | Obtain and verify the installation package. | Obtain the installation package and verify the package integrity. | One day before the upgrade | 0.5 hour |
5 | Perform the health check. | Check the OS status using the gs_checkos tool | One day before the upgrade | 0.5 hour |
6 | Check the disk usage of each database node. | Check the disk usage by running the df command. | One day before the upgrade | 0.5 hour |
7 | Check the database status. | Check the database status using the gs_om tool. | One day before the upgrade | 0.5 hour |
-
-> **NOTE:** **Time Required** varies depends on the environment, including data volume, server performance, and other factors.
-
-### Collecting Node Information
-
-You can contact the system administrator to obtain the environment information, such as name, IP address, and passwords of users **root** and **omm** of the database node.
-
-**Table 4** Node information
-
-
-
- No. |
- Node Name |
- IP Address of the Node |
-
-Password of User root |
- Password of User omm |
- Remarks |
-
-
-1 |
-
-- |
-
-- |
- - |
- - |
- - |
-
-
-
-### Backing Up Data
-
-Once the upgrade fails, services will be affected. Therefore, you need to back up data in advance so that services can be quickly restored once the risk occurs.
-
-For details about data backup, see the **Backup and Restoration** section in the *Administrator Guide*.
-
-### Obtaining the Installation Package
-
-You can obtain the installation package from [this website](https://www.mogdb.io/en/downloads/mogdb/).
-
-### Performing the Health Check
-
-The **gs_checkos** tool can be used to check the OS status.
-
-**Prerequisites**
-
-- The current hardware and network environment is normal.
-- The mutual trust between the **root** users of all hosts is normal.
-- The **gs_checkos** command can be executed only as user **root**.
-
-**Procedure**
-
-1. Log in to the primary database node as user **root**.
-
-2. Run the following command to check the server OS parameters:
-
- ```
- # gs_checkos -i A
- ```
-
- Checking the OS parameters aims to ensure that the database can be pre-installed normally and can be run safely and efficiently after being installed.
-
-#### Checking the Disk Usage of the Database Node
-
-It is recommended that the upgrade is performed when the disk usage of the database node is less than 80%.
-
-#### Checking the Database Status
-
-This section introduces how to check the database status.
-
-**Procedure**
-
-1. Log in to the primary database node as user **omm** and run the **source** command to reload environment variables.
-
- ```
- # su - omm
- $ source /home/omm/.bashrc
- ```
-
-2. Run the following command to check the database status:
-
- ```bash
- gs_om -t status
- ```
-
-3. Ensure that the database status is normal.
-
-## Upgrade Procedure
-
-This section introduces details about in-place upgrade and gray upgrade.
-
-**Procedure**
-
-1. Log in to the primary database node as user **root**.
-
-2. Create a directory for storing the new package.
-
- ```
- # mkdir -p /opt/software/mogdb_upgrade
- ```
-
-3. Upload the new package to the **/opt/software/mogdb_upgrade** directory and decompress the package.
-
-4. Found the **script** file.
-
- ```
- # cd /opt/software/mogdb_upgrade/script
- ```
-
-5. Create **static** folder, put the plugin package into **script/static** folder. (This step is a necessary operation, because the current version does not determine whether the user has used plugins, so the default database in the upgrade script to install the use of plugins, later versions will be a separate part of the plugin split out.)
-
- For example:
-
- ```sql
- mkdir static
- cd static/
- wget https://cdn-mogdb.enmotech.com/mogdb-media/3.0.1/Plugins-3.0.1-CentOS-x86_64.tar.gz
- ```
-
-6. Before the in-place or gray upgrade, execute the pre-installation script by running the **gs_preinstall** command.
-
- ```
- # ./gs_preinstall -U omm -G dbgrp -X /opt/software/mogdb/clusterconfig.xml
- ```
-
-7. Switch to user **omm**.
-
- ```
- # su - omm
- ```
-
-8. After ensuring that the database status is normal, run the required command to perform the in-place upgrade or gray upgrade.
-
- Example one: Execute the **gs_upgradectl** script to perform the in-place upgrade.
-
- ```bash
- gs_upgradectl -t auto-upgrade -X /opt/software/mogdb/clusterconfig.xml
- ```
-
- Example two: Execute the **gs_upgradectl** script to perform the gray upgrade.
-
- ```bash
- gs_upgradectl -t auto-upgrade -X /opt/software/mogdb/clusterconfig.xml --grey
- ```
-
-## Upgrade Verification
-
-This section introduces upgrade verification and provides detailed use cases and operations.
-
-### Verifying the Checklist of the Project
-
-**Table 5** Verification item checklist
-
- No. | Verification Item | Check Standard | Check Result |
1 | Version check | Check whether the version is correct after the upgrade. | - |
2 | Health check | Use the gs_checkos tool to check the OS status. | - |
3 | Database status | Use the gs_om tool to check the database status. | - |
-
-### Querying the Upgrade Version
-
-This section introduces how to check the version.
-
-**Procedure**
-
-1. Log in to the primary database node as user **omm** and run the **source** command to reload environment variables.
-
- ```
- # su - omm
- $ source /home/omm/.bashrc
- ```
-
-2. Run the following command to check the version information of all nodes:
-
- ```bash
- gs_ssh -c "gsql -V"
- ```
-
-### Checking the Database Status
-
-This section introduces how to check the database status.
-
-**Procedure**
-
-1. Log in to the primary database node as user **omm**.
-
- ```
- # su - omm
- ```
-
-2. Run the following command to check the database status:
-
- ```bash
- gs_om -t status
- ```
-
- If the value of **cluster_state** is **Normal**, the database is normal.
-
-## Upgrade Submission
-
-After the upgrade, if the verification is successful, the subsequent operation is to submit the upgrade.
-
->  **NOTE:** Once the upgrade is submitted, it cannot be rolled back.
-
-**Procedure**
-
-1. Log in to the primary database node as user **omm**.
-
- ```
- # su - omm
- ```
-
-2. Run the following command to submit the upgrade:
-
- ```bash
- gs_upgradectl -t commit-upgrade -X /opt/software/mogdb/clusterconfig.xml
- ```
-
-3. Reset the control file format to be compatible with the new ustore storage engine added in version 2.1.0 (2.0.1 upgrade to 2.1 only).
-
- >  **CAUTION**:
- >
- > - This operation is not reversible and cannot be downgraded back to version 2.0.1 after execution.
- > - Before performing this operation, it is recommended to make a full data backup by referring to [Logical Backup Recovery](../administrator-guide/backup-and-restoration/logical-backup-and-restoration.md).
-
- ```
- pg_resetxlog -f $PGDATA
- ```
-
- The echo appear as follow:
-
- ```
- Transaction log reset
- ```
-
-## Version Rollback
-
-This section introduces how to roll back the upgrade.
-
-**Procedure**
-
-1. Log in to the primary database node as user **omm**.
-
- ```
- # su - omm
- ```
-
-2. Run the following command to perform the rollback operation (rolling back the kernel code). After the rollback, if you need to keep the versions of the kernel code and OM code consistent, execute the pre-installation script in the old package. (For details, see the [execute the pre-installtion script](#qianzhijiaoben) step.)
-
- ```bash
- gs_upgradectl -t auto-rollback -X /opt/software/mogdb/clusterconfig.xml
- ```
-
- >  **NOTE:** If the database is abnormal, run the following command to perform the forcible rollback operation:
- >
- > ```bash
- > gs_upgradectl -t auto-rollback -X /opt/software/mogdb/clusterconfig.xml --force
- > ```
-
-3. Check the version after the rollback.
-
- ```bash
- gs_om -V | --version
- ```
-
- If the upgrade fails, perform the following operations to resolve the issue:
-
- a. Check whether the environment is abnormal.
-
- For example, the disk is fully occupied, the network is faulty, or the installation package or upgrade version is incorrect. After the problem is located and resolved, try to perform the upgrade again.
-
- b. If no environment issue is found or the upgrade fails again, collect related logs and contact technical engineers.
-
- Run the following command to collect logs:
-
- ```bash
- gs_collector -begin-time='20200724 00:00' -end-time='20200725 00:00'
- ```
-
- If permitted, you are advised to retain the environment.
diff --git a/product/en/docs-mogdb/v5.0/characteristic-description/characteristic-description-overview.md b/product/en/docs-mogdb/v5.0/characteristic-description/characteristic-description-overview.md
index a3baf2bcf1b7207d7a5555babd6ae20e92bd2f57..a733e828fc8e7f38d25ff709c7cfea0feec34363 100644
--- a/product/en/docs-mogdb/v5.0/characteristic-description/characteristic-description-overview.md
+++ b/product/en/docs-mogdb/v5.0/characteristic-description/characteristic-description-overview.md
@@ -1,151 +1,150 @@
----
-title: Characteristic Description
-summary: Characteristic Description
-author: Guo Huan
-date: 2022-09-01
----
-
-# Characteristic Description
-
-MogDB 5.0 has the following characteristics.
-
-+ High Performance
- + [CBO Optimizer](./high-performance/1-cbo-optimizer.md)
- + [LLVM](./high-performance/2-llvm.md)
- + [Vectorized Engine](./high-performance/3-vectorized-engine.md)
- + [Hybrid Row-Column Store](./high-performance/4-hybrid-row-column-store.md)
- + [Adaptive Compression](./high-performance/5-adaptive-compression.md)
- + [SQL Bpass](./high-performance/sql-bypass.md)
- + [Kunpeng NUMA Architecture Optimization](./high-performance/7-kunpeng-numa-architecture-optimization.md)
- + [High Concurrency of Thread Pools](./high-performance/8-high-concurrency-of-thread-pools.md)
- + [SMP for Parallel Execution](./high-performance/9-smp-for-parallel-execution.md)
- + [Xlog no Lock Flush](./high-performance/10-xlog-no-lock-flush.md)
- + [Parallel Page-based Redo For Ustore](./high-performance/11-parallel-page-based-redo-for-ustore.md)
- + [Row-Store Execution to Vectorized Execution](./high-performance/12-row-store-execution-to-vectorized-execution.md)
- + [Astore Row Level Compression](./high-performance/astore-row-level-compression.md)
- + [BTree Index Compression](./high-performance/btree-index-compression.md)
- + [Tracing SQL Function](./high-performance/tracing-SQL-function.md)
- + [Parallel Index Scan](./high-performance/parallel-index-scan.md)
- + [Enhancement of Tracing Backend Key Thread](./high-performance/enhancement-of-tracing-backend-key-thread.md)
- + [Ordering Operator Optimization](./high-performance/ordering-operator-optimization.md)
- + [OCK-accelerated Data Transmission](./high-performance/ock-accelerated-data-transmission.md)
- + [OCK SCRLock Accelerate Distributed Lock](./high-performance/ock-scrlock-accelerate-distributed-lock.md)
-+ High Availability (HA)
- + [Primary/Standby](./high-availability/1-primary-standby.md)
- + [Logical Replication](./high-availability/2-logical-replication.md)
- + [Logical Backup](./high-availability/4-logical-backup.md)
- + [Physical Backup](./high-availability/5-physical-backup.md)
- + [Automatic Job Retry upon Failure](./high-availability/6-automatic-job-retry-upon-failure.md)
- + [Ultimate RTO](./high-availability/7-ultimate-rto.md)
- + [High Availability Based on the Paxos Protocol](./high-availability/high-availability-based-on-the-paxos-protocol.md)
- + [Cascaded Standby Server](./high-availability/8-cascaded-standby-server.md)
- + [Delayed Replay](./high-availability/9-delayed-replay.md)
- + [Adding or Deleting a Standby Server](./high-availability/10-adding-or-deleting-a-standby-server.md)
- + [Delaying Entering the Maximum Availability Mode](./high-availability/11-delaying-entering-the-maximum-availability-mode.md)
- + [Parallel Logical Decoding](./high-availability/12-parallel-logical-decoding.md)
- + [DCF](./high-availability/13-dcf.md)
- + [CM](./high-availability/14-cm.md)
- + [Global SysCache](./high-availability/15-global-syscache.md)
- + [Using a Standby Node to Build a Standby Node](./high-availability/16-using-a-standby-node-to-build-a-standby-node.md)
- + [Two-City Three-DC DR](./high-availability/17-two-city-three-dc-dr.md)
- + [CM Cluster Management Component Supporting Two Node Deployment](./high-availability/cm-cluster-management-component-supporting-two-node-deployment.md)
-+ Maintainability
- + [Gray Upgrade](./maintainability/1-gray-upgrade.md)
- + [Workload Diagnosis Report (WDR)](./maintainability/2-workload-diagnosis-report.md)
- + [Slow SQL Diagnosis](./maintainability/3-slow-sql-diagnosis.md)
- + [Session Performance Diagnosis](./maintainability/4-session-performance-diagnosis.md)
- + [System KPI-aided Diagnosis](./maintainability/5-system-kpi-aided-diagnosis.md)
- + [Fault Diagnosis](./maintainability/fault-diagnosis.md)
- + [Extension-Splitting](./maintainability/extension-splitting.md)
- + [Built-in Stack Tool](./maintainability/built-in-stack-tool.md)
- + [SQL PATCH](./maintainability/sql-patch.md)
-+ Compatibility
- + [Add %rowtype Attribute To The View](./compatibility/add-rowtype-attribute-to-the-view.md)
- + [Aggregate Functions Distinct Performance Optimization](./compatibility/aggregate-functions-distinct-performance-optimization.md)
- + [Aggregate Functions Support Keep Clause](./compatibility/aggregate-functions-support-keep-clause.md)
- + [Aggregate Functions Support Scenario Extensions](./compatibility/aggregate-functions-support-scenario-extensions.md)
- + [Compatible With MySQL Alias Support For Single Quotes](./compatibility/compatible-with-mysql-alias-support-for-single-quotes.md)
- + [current_date/current_time Keywords As Field Name](./compatibility/current_date-current_time-keywords-as-field-name.md)
- + [Custom Type Array](./compatibility/custom-type-array.md)
- + [For Update Support Outer Join](./compatibility/for-update-supports-outer-join.md)
- + [MogDB Supports Insert All](./compatibility/mogdb-supports-insert-all.md)
- + [Oracle DBLink Syntax Compatibility](./compatibility/oracle-dblink-syntax-compatibility.md)
- + [Remove Type Conversion Hint When Creating PACKAGE/FUNCTION/PROCEDURE](./compatibility/remove-type-conversion-hint-when-creating-package-function-procedure.md)
- + [Support Bypass Method When Merge Into Hit Index](./compatibility/support-bypass-method-when-merge-into-hit-index.md)
- + [Support For Adding Nocopy Attributes To Procedure And Function Parameters](./compatibility/support-for-adding-nocopy-attributes-to-procedure-and-function-parameters.md)
- + [Support For Passing The Count Attribute Of An Array As A Parameter Of The Array Extend](./compatibility/support-passing-the-count-attribute.md)
- + [Support Q Quote Escape Character](./compatibility/support-q-quote-escape-character.md)
- + [Support Subtracting Two Date Types To Return Numeric Type](./compatibility/support-subtracting-two-date-types-to-return-numeric-type.md)
- + [Support table()](./compatibility/support-table-function.md)
- + [Support To Keep The Same Name After The End With Oracle](./compatibility/support-to-keep-the-same-name-after-the-end-with-oracle.md)
- + [Support Where Current Of](./compatibility/support-where-current-of.md)
- + [Support For Constants In Package As Default Values](./compatibility/support-for-constants-in-package-as-default-values.md)
- + [Support PLPGSQL subtype](./compatibility/support-plpgsql-subtype.md)
- + [Support Synonym Calls Without Parentheses For Function Without Parameters](./compatibility/support-synonym-calls-without-parentheses-for-function-without-parameters.md)
- + [Support For dbms_utility.format_error_backtrace](./compatibility/format-error-backtrace.md)
-+ Database Security
- + [Access Control Model](./database-security/1-access-control-model.md)
- + [Separation of Control and Access Permissions](./database-security/2-separation-of-control-and-access-permissions.md)
- + [Database Encryption Authentication](./database-security/3-database-encryption-authentication.md)
- + [Data Encryption and Storage](./database-security/4-data-encryption-and-storage.md)
- + [Database Audit](./database-security/5-database-audit.md)
- + [Network Communication Security](./database-security/6-network-communication-security.md)
- + [Resource Label](./database-security/7-resource-label.md)
- + [Unified Audit](./database-security/8-unified-audit.md)
- + [Dynamic Data Anonymization](./database-security/9-dynamic-data-anonymization.md)
- + [Row-Level Access Control](./database-security/10-row-level-access-control.md)
- + [Password Strength Verification](./database-security/11-password-strength-verification.md)
- + [Equality Query in a Fully-encrypted Database](./database-security/12-equality-query-in-a-fully-encrypted-database.md)
- + [Ledger Database Mechanism](./database-security/13-ledger-database-mechanism.md)
- + [Transparent Data Encryption](./database-security/14-transparent-data-encryption.md)
-+ Enterprise-Level Features
- + [Support for Functions and Stored Procedures](./enterprise-level-features/1-support-for-functions-and-stored-procedures.md)
- + [SQL Hints](./enterprise-level-features/2-sql-hints.md)
- + [Full-Text Indexing](./enterprise-level-features/3-full-text-indexing.md)
- + [Copy Interface for Error Tolerance](./enterprise-level-features/4-copy-interface-for-error-tolerance.md)
- + [Partitioning](./enterprise-level-features/5-partitioning.md)
- + [Support for Advanced Analysis Functions](./enterprise-level-features/6-support-for-advanced-analysis-functions.md)
- + [Materialized View](./enterprise-level-features/7-materialized-view.md)
- + [HyperLogLog](./enterprise-level-features/8-hyperloglog.md)
- + [Creating an Index Online](./enterprise-level-features/9-creating-an-index-online.md)
- + [Autonomous Transaction](./enterprise-level-features/10-autonomous-transaction.md)
- + [Global Temporary Table](./enterprise-level-features/11-global-temporary-table.md)
- + [Pseudocolumn ROWNUM](./enterprise-level-features/12-pseudocolumn-rownum.md)
- + [Stored Procedure Debugging](./enterprise-level-features/13-stored-procedure-debugging.md)
- + [JDBC Client Load Balancing and Read/Write Isolation](./enterprise-level-features/14-jdbc-client-load-balancing-and-readwrite-isolation.md)
- + [In-place Update Storage Engine](./enterprise-level-features/15-in-place-update-storage-engine.md)
- + [Publication-Subscription](./enterprise-level-features/16-publication-subscription.md)
- + [Foreign Key Lock Enhancement](./enterprise-level-features/17-foreign-key-lock-enhancement.md)
- + [Data Compression in OLTP Scenarios](./enterprise-level-features/18-data-compression-in-oltp-scenarios.md)
- + [Transaction Async Submit](./enterprise-level-features/19-transaction-async-submit.md)
- + [Index Creation Parallel Control](./enterprise-level-features/23-index-creation-parallel-control.md)
- + [Dynamic Partition Pruning](./enterprise-level-features/21-dynamic-partition-pruning.md)
- + [COPY Import Optimization](./enterprise-level-features/20-copy-import-optimization.md)
- + [SQL Running Status Observation](./enterprise-level-features/22-sql-running-status-observation.md)
- + [BRIN Index](./enterprise-level-features/24-brin-index.md)
- + [BLOOM Index](./enterprise-level-features/25-bloom-index.md)
- + [Event Trigger](./enterprise-level-features/event-trigger.md)
-+ Application Development Interfaces
- + [Standard SQL](./application-development-interfaces/1-standard-sql.md)
- + [Standard Development Interfaces](./application-development-interfaces/2-standard-development-interfaces.md)
- + [PostgreSQL API Compatibility](./application-development-interfaces/3-postgresql-api-compatibility.md)
- + [MogDB-Oracle Compatibility](./application-development-interfaces/MogDB-Oracle-compatibility.md)
- + [MogDB-MySQL Compatibility](./application-development-interfaces/MogDB-MySQL-compatibility.md)
- + [Embedded SQL Preprocessor ECPG](./application-development-interfaces/ECPG.md)
-+ AI Capabilities
- + AI4DB: Autonomous Database O&M
- + [Database Metric Collection, Forecast, and Exception Detection](./ai-capabilities/ai4db-autonomous-database-o-m/1-database-metric-collection-forecast-and-exception-detection.md)
- + [Root Cause Analysis for Slow SQL Statements](./ai-capabilities/ai4db-autonomous-database-o-m/2-root-cause-analysis-for-slow-sql-statements.md)
- + [Index Recommendation](./ai-capabilities/ai4db-autonomous-database-o-m/3-index-recommendation.md)
- + [Parameter Tuning and Diagnosis](./ai-capabilities/ai4db-autonomous-database-o-m/4-parameter-tuning-and-diagnosis.md)
- + [Slow SQL Statement Discovery](./ai-capabilities/ai4db-autonomous-database-o-m/5-slow-sql-statement-discovery.md)
- + [DB4AI: Database-driven AI](./ai-capabilities/db4ai-database-driven-ai.md)
- + ABO Optimizer
- + [Intelligent Cardinality Estimation](./ai-capabilities/abo-optimizer/intelligent-cardinality-estimation.md)
- + [Adaptive Plan Selection](./ai-capabilities/abo-optimizer/adaptive-plan-selection.md)
-+ Middleware
- + [Distributed Database Capability](./middleware/distributed-database-capability.md)
- + [Deploying a Distributed Database Using Kubernetes](./middleware/deploying-a-distributed-database-using-kubernetes.md)
- + [Distributed Analysis Capabilities](./middleware/distributed-analysis-capabilities.md)
-+ Workload Management
+---
+title: Characteristic Description
+summary: Characteristic Description
+author: Guo Huan
+date: 2022-09-01
+---
+
+# Characteristic Description
+
+MogDB 5.0 has the following characteristics.
+
++ High Performance
+ + [CBO Optimizer](./high-performance/1-cbo-optimizer.md)
+ + [LLVM](./high-performance/2-llvm.md)
+ + [Vectorized Engine](./high-performance/3-vectorized-engine.md)
+ + [Hybrid Row-Column Store](./high-performance/4-hybrid-row-column-store.md)
+ + [Adaptive Compression](./high-performance/5-adaptive-compression.md)
+ + [SQL Bpass](./high-performance/sql-bypass.md)
+ + [Kunpeng NUMA Architecture Optimization](./high-performance/7-kunpeng-numa-architecture-optimization.md)
+ + [High Concurrency of Thread Pools](./high-performance/8-high-concurrency-of-thread-pools.md)
+ + [SMP for Parallel Execution](./high-performance/9-smp-for-parallel-execution.md)
+ + [Xlog no Lock Flush](./high-performance/10-xlog-no-lock-flush.md)
+ + [Parallel Page-based Redo For Ustore](./high-performance/11-parallel-page-based-redo-for-ustore.md)
+ + [Row-Store Execution to Vectorized Execution](./high-performance/12-row-store-execution-to-vectorized-execution.md)
+ + [Astore Row Level Compression](./high-performance/astore-row-level-compression.md)
+ + [BTree Index Compression](./high-performance/btree-index-compression.md)
+ + [Tracing SQL Function](./high-performance/tracing-SQL-function.md)
+ + [Parallel Index Scan](./high-performance/parallel-index-scan.md)
+ + [Enhancement of Tracing Backend Key Thread](./high-performance/enhancement-of-tracing-backend-key-thread.md)
+ + [Ordering Operator Optimization](./high-performance/ordering-operator-optimization.md)
+ + [OCK-accelerated Data Transmission](./high-performance/ock-accelerated-data-transmission.md)
+ + [OCK SCRLock Accelerate Distributed Lock](./high-performance/ock-scrlock-accelerate-distributed-lock.md)
++ High Availability (HA)
+ + [Primary/Standby](./high-availability/1-primary-standby.md)
+ + [Logical Replication](./high-availability/2-logical-replication.md)
+ + [Logical Backup](./high-availability/4-logical-backup.md)
+ + [Physical Backup](./high-availability/5-physical-backup.md)
+ + [Automatic Job Retry upon Failure](./high-availability/6-automatic-job-retry-upon-failure.md)
+ + [Ultimate RTO](./high-availability/7-ultimate-rto.md)
+ + [High Availability Based on the Paxos Protocol](./high-availability/high-availability-based-on-the-paxos-protocol.md)
+ + [Cascaded Standby Server](./high-availability/8-cascaded-standby-server.md)
+ + [Delayed Replay](./high-availability/9-delayed-replay.md)
+ + [Adding or Deleting a Standby Server](./high-availability/10-adding-or-deleting-a-standby-server.md)
+ + [Delaying Entering the Maximum Availability Mode](./high-availability/11-delaying-entering-the-maximum-availability-mode.md)
+ + [Parallel Logical Decoding](./high-availability/12-parallel-logical-decoding.md)
+ + [DCF](./high-availability/13-dcf.md)
+ + [CM](./high-availability/14-cm.md)
+ + [Global SysCache](./high-availability/15-global-syscache.md)
+ + [Using a Standby Node to Build a Standby Node](./high-availability/16-using-a-standby-node-to-build-a-standby-node.md)
+ + [Two-City Three-DC DR](./high-availability/17-two-city-three-dc-dr.md)
+ + [CM Cluster Management Component Supporting Two Node Deployment](./high-availability/cm-cluster-management-component-supporting-two-node-deployment.md)
++ Maintainability
+ + [Workload Diagnosis Report (WDR)](./maintainability/2-workload-diagnosis-report.md)
+ + [Slow SQL Diagnosis](./maintainability/3-slow-sql-diagnosis.md)
+ + [Session Performance Diagnosis](./maintainability/4-session-performance-diagnosis.md)
+ + [System KPI-aided Diagnosis](./maintainability/5-system-kpi-aided-diagnosis.md)
+ + [Fault Diagnosis](./maintainability/fault-diagnosis.md)
+ + [Extension-Splitting](./maintainability/extension-splitting.md)
+ + [Built-in Stack Tool](./maintainability/built-in-stack-tool.md)
+ + [SQL PATCH](./maintainability/sql-patch.md)
++ Compatibility
+ + [Add %rowtype Attribute To The View](./compatibility/add-rowtype-attribute-to-the-view.md)
+ + [Aggregate Functions Distinct Performance Optimization](./compatibility/aggregate-functions-distinct-performance-optimization.md)
+ + [Aggregate Functions Support Keep Clause](./compatibility/aggregate-functions-support-keep-clause.md)
+ + [Aggregate Functions Support Scenario Extensions](./compatibility/aggregate-functions-support-scenario-extensions.md)
+ + [Compatible With MySQL Alias Support For Single Quotes](./compatibility/compatible-with-mysql-alias-support-for-single-quotes.md)
+ + [current_date/current_time Keywords As Field Name](./compatibility/current_date-current_time-keywords-as-field-name.md)
+ + [Custom Type Array](./compatibility/custom-type-array.md)
+ + [For Update Support Outer Join](./compatibility/for-update-supports-outer-join.md)
+ + [MogDB Supports Insert All](./compatibility/mogdb-supports-insert-all.md)
+ + [Oracle DBLink Syntax Compatibility](./compatibility/oracle-dblink-syntax-compatibility.md)
+ + [Remove Type Conversion Hint When Creating PACKAGE/FUNCTION/PROCEDURE](./compatibility/remove-type-conversion-hint-when-creating-package-function-procedure.md)
+ + [Support Bypass Method When Merge Into Hit Index](./compatibility/support-bypass-method-when-merge-into-hit-index.md)
+ + [Support For Adding Nocopy Attributes To Procedure And Function Parameters](./compatibility/support-for-adding-nocopy-attributes-to-procedure-and-function-parameters.md)
+ + [Support For Passing The Count Attribute Of An Array As A Parameter Of The Array Extend](./compatibility/support-passing-the-count-attribute.md)
+ + [Support Q Quote Escape Character](./compatibility/support-q-quote-escape-character.md)
+ + [Support Subtracting Two Date Types To Return Numeric Type](./compatibility/support-subtracting-two-date-types-to-return-numeric-type.md)
+ + [Support table()](./compatibility/support-table-function.md)
+ + [Support To Keep The Same Name After The End With Oracle](./compatibility/support-to-keep-the-same-name-after-the-end-with-oracle.md)
+ + [Support Where Current Of](./compatibility/support-where-current-of.md)
+ + [Support For Constants In Package As Default Values](./compatibility/support-for-constants-in-package-as-default-values.md)
+ + [Support PLPGSQL subtype](./compatibility/support-plpgsql-subtype.md)
+ + [Support Synonym Calls Without Parentheses For Function Without Parameters](./compatibility/support-synonym-calls-without-parentheses-for-function-without-parameters.md)
+ + [Support For dbms_utility.format_error_backtrace](./compatibility/format-error-backtrace.md)
++ Database Security
+ + [Access Control Model](./database-security/1-access-control-model.md)
+ + [Separation of Control and Access Permissions](./database-security/2-separation-of-control-and-access-permissions.md)
+ + [Database Encryption Authentication](./database-security/3-database-encryption-authentication.md)
+ + [Data Encryption and Storage](./database-security/4-data-encryption-and-storage.md)
+ + [Database Audit](./database-security/5-database-audit.md)
+ + [Network Communication Security](./database-security/6-network-communication-security.md)
+ + [Resource Label](./database-security/7-resource-label.md)
+ + [Unified Audit](./database-security/8-unified-audit.md)
+ + [Dynamic Data Anonymization](./database-security/9-dynamic-data-anonymization.md)
+ + [Row-Level Access Control](./database-security/10-row-level-access-control.md)
+ + [Password Strength Verification](./database-security/11-password-strength-verification.md)
+ + [Equality Query in a Fully-encrypted Database](./database-security/12-equality-query-in-a-fully-encrypted-database.md)
+ + [Ledger Database Mechanism](./database-security/13-ledger-database-mechanism.md)
+ + [Transparent Data Encryption](./database-security/14-transparent-data-encryption.md)
++ Enterprise-Level Features
+ + [Support for Functions and Stored Procedures](./enterprise-level-features/1-support-for-functions-and-stored-procedures.md)
+ + [SQL Hints](./enterprise-level-features/2-sql-hints.md)
+ + [Full-Text Indexing](./enterprise-level-features/3-full-text-indexing.md)
+ + [Copy Interface for Error Tolerance](./enterprise-level-features/4-copy-interface-for-error-tolerance.md)
+ + [Partitioning](./enterprise-level-features/5-partitioning.md)
+ + [Support for Advanced Analysis Functions](./enterprise-level-features/6-support-for-advanced-analysis-functions.md)
+ + [Materialized View](./enterprise-level-features/7-materialized-view.md)
+ + [HyperLogLog](./enterprise-level-features/8-hyperloglog.md)
+ + [Creating an Index Online](./enterprise-level-features/9-creating-an-index-online.md)
+ + [Autonomous Transaction](./enterprise-level-features/10-autonomous-transaction.md)
+ + [Global Temporary Table](./enterprise-level-features/11-global-temporary-table.md)
+ + [Pseudocolumn ROWNUM](./enterprise-level-features/12-pseudocolumn-rownum.md)
+ + [Stored Procedure Debugging](./enterprise-level-features/13-stored-procedure-debugging.md)
+ + [JDBC Client Load Balancing and Read/Write Isolation](./enterprise-level-features/14-jdbc-client-load-balancing-and-readwrite-isolation.md)
+ + [In-place Update Storage Engine](./enterprise-level-features/15-in-place-update-storage-engine.md)
+ + [Publication-Subscription](./enterprise-level-features/16-publication-subscription.md)
+ + [Foreign Key Lock Enhancement](./enterprise-level-features/17-foreign-key-lock-enhancement.md)
+ + [Data Compression in OLTP Scenarios](./enterprise-level-features/18-data-compression-in-oltp-scenarios.md)
+ + [Transaction Async Submit](./enterprise-level-features/19-transaction-async-submit.md)
+ + [Index Creation Parallel Control](./enterprise-level-features/23-index-creation-parallel-control.md)
+ + [Dynamic Partition Pruning](./enterprise-level-features/21-dynamic-partition-pruning.md)
+ + [COPY Import Optimization](./enterprise-level-features/20-copy-import-optimization.md)
+ + [SQL Running Status Observation](./enterprise-level-features/22-sql-running-status-observation.md)
+ + [BRIN Index](./enterprise-level-features/24-brin-index.md)
+ + [BLOOM Index](./enterprise-level-features/25-bloom-index.md)
+ + [Event Trigger](./enterprise-level-features/event-trigger.md)
++ Application Development Interfaces
+ + [Standard SQL](./application-development-interfaces/1-standard-sql.md)
+ + [Standard Development Interfaces](./application-development-interfaces/2-standard-development-interfaces.md)
+ + [PostgreSQL API Compatibility](./application-development-interfaces/3-postgresql-api-compatibility.md)
+ + [MogDB-Oracle Compatibility](./application-development-interfaces/MogDB-Oracle-compatibility.md)
+ + [MogDB-MySQL Compatibility](./application-development-interfaces/MogDB-MySQL-compatibility.md)
+ + [Embedded SQL Preprocessor ECPG](./application-development-interfaces/ECPG.md)
++ AI Capabilities
+ + AI4DB: Autonomous Database O&M
+ + [Database Metric Collection, Forecast, and Exception Detection](./ai-capabilities/ai4db-autonomous-database-o-m/1-database-metric-collection-forecast-and-exception-detection.md)
+ + [Root Cause Analysis for Slow SQL Statements](./ai-capabilities/ai4db-autonomous-database-o-m/2-root-cause-analysis-for-slow-sql-statements.md)
+ + [Index Recommendation](./ai-capabilities/ai4db-autonomous-database-o-m/3-index-recommendation.md)
+ + [Parameter Tuning and Diagnosis](./ai-capabilities/ai4db-autonomous-database-o-m/4-parameter-tuning-and-diagnosis.md)
+ + [Slow SQL Statement Discovery](./ai-capabilities/ai4db-autonomous-database-o-m/5-slow-sql-statement-discovery.md)
+ + [DB4AI: Database-driven AI](./ai-capabilities/db4ai-database-driven-ai.md)
+ + ABO Optimizer
+ + [Intelligent Cardinality Estimation](./ai-capabilities/abo-optimizer/intelligent-cardinality-estimation.md)
+ + [Adaptive Plan Selection](./ai-capabilities/abo-optimizer/adaptive-plan-selection.md)
++ Middleware
+ + [Distributed Database Capability](./middleware/distributed-database-capability.md)
+ + [Deploying a Distributed Database Using Kubernetes](./middleware/deploying-a-distributed-database-using-kubernetes.md)
+ + [Distributed Analysis Capabilities](./middleware/distributed-analysis-capabilities.md)
++ Workload Management
+ [High-Latency Escape at the Infrastructure Layer](./workload-management/high-latency-escape-at-the-infrastructure-layer.md)
\ No newline at end of file
diff --git a/product/en/docs-mogdb/v5.0/characteristic-description/maintainability/1-gray-upgrade.md b/product/en/docs-mogdb/v5.0/characteristic-description/maintainability/1-gray-upgrade.md
deleted file mode 100644
index 5b5110cb351901333be672b8c73297f74cd138fd..0000000000000000000000000000000000000000
--- a/product/en/docs-mogdb/v5.0/characteristic-description/maintainability/1-gray-upgrade.md
+++ /dev/null
@@ -1,40 +0,0 @@
----
-title: Gray Upgrade
-summary: Gray Upgrade
-author: Guo Huan
-date: 2022-05-07
----
-
-# Gray Upgrade
-
-## Availability
-
-This feature is available since MogDB 2.0.0.
-
-## Introduction
-
-Gray upgrade supports full-service operations. All nodes can be upgraded at a time.
-
-## Benefits
-
-Gray upgrade provides an online upgrade mode to ensure that all nodes are upgraded without interrupting services.
-
-## Description
-
-Gray upgrade is an online upgrade mode that upgrades all nodes. If only the binary files of the database need to be replaced during the gray upgrade, to minimize the impact on services, the two sets of binary files exist on the same node at the same time, and the soft connection switchover mode is used to switch the process version (one intermittent disconnection within 10 seconds).
-
-## Enhancements
-
-None.
-
-## Constraints
-
-For details about the gray upgrade constraints, see [Upgrade Guide](../../administrator-guide/upgrade-guide.md) in *Administrator Guide*.
-
-## Dependencies
-
-None.
-
-## Related Pages
-
-[Upgrade Guide](../../administrator-guide/upgrade-guide.md)
\ No newline at end of file
diff --git a/product/en/docs-mogdb/v5.0/characteristic-description/maintainability/maintainability.md b/product/en/docs-mogdb/v5.0/characteristic-description/maintainability/maintainability.md
index 4d4547919cc844575a87bb67af4fc60fe88909d9..792d95a5ffe51c54ae87a1f857bf24b787fed413 100644
--- a/product/en/docs-mogdb/v5.0/characteristic-description/maintainability/maintainability.md
+++ b/product/en/docs-mogdb/v5.0/characteristic-description/maintainability/maintainability.md
@@ -7,7 +7,6 @@ date: 2023-05-22
# Maintainability
-+ **[Gray Upgrade](1-gray-upgrade.md)**
+ **[WDR](2-workload-diagnosis-report.md)**
+ **[Slow SQL Diagnosis](3-slow-sql-diagnosis.md)**
+ **[Session Performance Diagnosis](4-session-performance-diagnosis.md)**
diff --git a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-DATABASE.md b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-DATABASE.md
index eba7ea62b5fa188124c144bcd6e8f051b01c2053..23a5e1919026f420f37622e6c992e3aa8a20fafd 100644
--- a/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-DATABASE.md
+++ b/product/en/docs-mogdb/v5.0/reference-guide/sql-syntax/CREATE-DATABASE.md
@@ -136,7 +136,7 @@ CreateDatabase ::= CREATE DATABASE [IF NOT EXISTS] database_name
- **DBCOMPATIBILITY [ = ] compatibility_type**
- Specifies the compatible database type. The default value is **O**.
+ Specifies the compatible database type. The default compatible database is Oracle.
Value range: **A**, **B** and **PG**, indicating Oracle, MySQL and Postgres databases, respectively.
diff --git a/product/en/docs-mogdb/v5.0/toc.md b/product/en/docs-mogdb/v5.0/toc.md
index 5d030f36f5e2f88d55810cefdbe7669874736312..e7db65f9578dfcb26981eabe62d40fd648e73eac 100644
--- a/product/en/docs-mogdb/v5.0/toc.md
+++ b/product/en/docs-mogdb/v5.0/toc.md
@@ -92,7 +92,6 @@
+ [CM Cluster Management Component Supporting Two Node Deployment](/characteristic-description/high-availability/cm-cluster-management-component-supporting-two-node-deployment.md)
+ [Query of the Original DDL Statement for a View](/characteristic-description/high-availability/ddl-query-of-view.md)
+ [Maintainability](/characteristic-description/maintainability/maintainability.md)
- + [Gray Upgrade](/characteristic-description/maintainability/1-gray-upgrade.md)
+ [Workload Diagnosis Report (WDR)](/characteristic-description/maintainability/2-workload-diagnosis-report.md)
+ [Slow SQL Diagnosis](/characteristic-description/maintainability/3-slow-sql-diagnosis.md)
+ [Session Performance Diagnosis](/characteristic-description/maintainability/4-session-performance-diagnosis.md)
@@ -203,6 +202,11 @@
+ [PTK-based Installation](/installation-guide/ptk-based-installation.md)
+ [Manual Installation](/installation-guide/manual-installation.md)
+ [Recommended Parameter Settings](/installation-guide/recommended-parameter-settings.md)
++ [Upgrade Guide](/upgrade-guide/upgrade-guide.md)
+ + [Upgrade Overview](/upgrade-guide/1-upgrade-overview.md)
+ + [Read Before Upgrade](/upgrade-guide/2-read-before-upgrade.md)
+ + [In-place Upgrade](/upgrade-guide/3-in-place-upgrade.md)
+ + [Rolling Upgrade](/upgrade-guide/4-rolling-upgrade.md)
+ [Administrator Guide](/administrator-guide/administrator-guide.md)
+ [Localization](/administrator-guide/localization/localization.md)
+ [Locale Support](/administrator-guide/localization/locale-support.md)
@@ -281,7 +285,6 @@
+ [Exporting a Single Database](/administrator-guide/importing-and-exporting-data/exporting-data/2-exporting-a-single-database.md)
+ [Exporting All Databases](/administrator-guide/importing-and-exporting-data/exporting-data/3-exporting-all-databases.md)
+ [Data Export By a User Without Required Permissions](/administrator-guide/importing-and-exporting-data/exporting-data/4-data-export-by-a-user-without-required-permissions.md)
- + [Upgrade Guide](/administrator-guide/upgrade-guide.md)
+ [High Available Guide](./high-available-guide/high-available-guide.md)
+ [DCF(Distributed Consensus Framework)](./high-available-guide/high-available-dcf.md)
+ [CM(Cluster Manager)](./high-available-guide/cluster-management/cluster-management.md)
diff --git a/product/en/docs-mogdb/v5.0/toc_characteristic_description.md b/product/en/docs-mogdb/v5.0/toc_characteristic_description.md
index 0f927b9c950afdd9eaf6b96701b8fc39434d2227..17d6f1e156e0a5ab1f8d14b730249ac5d203a009 100644
--- a/product/en/docs-mogdb/v5.0/toc_characteristic_description.md
+++ b/product/en/docs-mogdb/v5.0/toc_characteristic_description.md
@@ -50,7 +50,6 @@
+ [CM Cluster Management Component Supporting Two Node Deployment](/characteristic-description/high-availability/cm-cluster-management-component-supporting-two-node-deployment.md)
+ [Query of the Original DDL Statement for a View](/characteristic-description/high-availability/ddl-query-of-view.md)
+ [Maintainability](/characteristic-description/maintainability/maintainability.md)
- + [Gray Upgrade](/characteristic-description/maintainability/1-gray-upgrade.md)
+ [Workload Diagnosis Report (WDR)](/characteristic-description/maintainability/2-workload-diagnosis-report.md)
+ [Slow SQL Diagnosis](/characteristic-description/maintainability/3-slow-sql-diagnosis.md)
+ [Session Performance Diagnosis](/characteristic-description/maintainability/4-session-performance-diagnosis.md)
diff --git a/product/en/docs-mogdb/v5.0/toc_manage.md b/product/en/docs-mogdb/v5.0/toc_manage.md
index 38df8137f5cd756e4b971a88eb510f5328a0219b..45b3e6bd12495d20e701212c99b317f5c6ae24c7 100644
--- a/product/en/docs-mogdb/v5.0/toc_manage.md
+++ b/product/en/docs-mogdb/v5.0/toc_manage.md
@@ -81,4 +81,3 @@
+ [Exporting a Single Database](/administrator-guide/importing-and-exporting-data/exporting-data/2-exporting-a-single-database.md)
+ [Exporting All Databases](/administrator-guide/importing-and-exporting-data/exporting-data/3-exporting-all-databases.md)
+ [Data Export By a User Without Required Permissions](/administrator-guide/importing-and-exporting-data/exporting-data/4-data-export-by-a-user-without-required-permissions.md)
-+ [Upgrade Guide](/administrator-guide/upgrade-guide.md)
diff --git a/product/en/docs-mogdb/v5.0/toc_upgrade.md b/product/en/docs-mogdb/v5.0/toc_upgrade.md
new file mode 100644
index 0000000000000000000000000000000000000000..58c2456d43e147eb85847cf3dd657c1074373bbe
--- /dev/null
+++ b/product/en/docs-mogdb/v5.0/toc_upgrade.md
@@ -0,0 +1,10 @@
+
+
+# MogDB Documentation 5.0
+
+## Upgrade Guide
+
++ [Upgrade Overview](./upgrade-guide/1-upgrade-overview.md)
++ [Read Before Upgrade](./upgrade-guide/2-read-before-upgrade.md)
++ [In-place Upgrade](./upgrade-guide/3-in-place-upgrade.md)
++ [Rolling Upgrade](./upgrade-guide/4-rolling-upgrade.md)
\ No newline at end of file
diff --git a/product/en/docs-mogdb/v5.0/upgrade-guide/1-upgrade-overview.md b/product/en/docs-mogdb/v5.0/upgrade-guide/1-upgrade-overview.md
new file mode 100644
index 0000000000000000000000000000000000000000..5737d214d1951226e9f72f96343218217089e2d7
--- /dev/null
+++ b/product/en/docs-mogdb/v5.0/upgrade-guide/1-upgrade-overview.md
@@ -0,0 +1,29 @@
+---
+title: Upgrade Overview
+summary: Upgrade Overview
+author: 郭欢
+date: 2024-05-17
+---
+
+# Upgrade Overview
+
+When a new version of the database is released and users decide to use the new version of the database based on the release information, they need to do an upgrade operation. Cluster upgrade refers to directly upgrading the database binaries and metadata to a higher version on the basis of an existing cluster without exporting data.
+
+This document is intended for upgrade personnel, who must:
+
+- Understand version information about the current device and related NEs.
+- Have experience in maintaining and operating these devices.
+
+
+
+## Upgrade Schemes
+
+There are two upgrade schemes supported by MogDB: in-place upgrade and rolling upgrade.
+
+**In-place Upgrade** (recommended): stop the business during the upgrade and upgrade all nodes in the cluster at once. Supports version upgrade with metadata changes and upgrade with plugins. In-place upgrade is the most convenient and commonly used upgrade method, and the process is simple and easy to operate.
+
+**Rolling Upgrade**: Upgrade the nodes in the cluster one by one. The advantage is that a node can always provide services to the outside world to ensure that the business is not interrupted. The disadvantage is that different versions of the database on the primary and standby nodes are running at the same time, the version of the metadata and the version of the log storage file can not have change. Upgrade with plugins is not supported.
+
+Both of the above upgrade schemes need to use PTK for operation. For the installation and upgrade of PTK, please refer to [PTK documentation](https://docs.mogdb.io/en/ptk/v1.1/install).
+
+Please make a good choice of scheme according to the business situation, if you have any questions, please contact Yunhe Enmo engineers to provide support.
\ No newline at end of file
diff --git a/product/en/docs-mogdb/v5.0/upgrade-guide/2-read-before-upgrade.md b/product/en/docs-mogdb/v5.0/upgrade-guide/2-read-before-upgrade.md
new file mode 100644
index 0000000000000000000000000000000000000000..d14082fbca0847bd36d07dbcd66cf54273c626fc
--- /dev/null
+++ b/product/en/docs-mogdb/v5.0/upgrade-guide/2-read-before-upgrade.md
@@ -0,0 +1,72 @@
+---
+title: Read Before Upgrade
+summary: Read Before Upgrade
+author: 郭欢
+date: 2024-05-17
+---
+
+# Read Before Upgrade
+
+## Upgrade Impact and Constraints
+
+The upgrade includes the following impacts and constraints, before upgrading, you should do a good job of fully checking and understanding, to ensure that the conditions can be met before upgrading, if you have any questions, please contact our engineers.
+
+- Do not perform the upgrade, scale-out, and scale-in at the same time.
+- Virtual IP addresses are not supported.
+- During the upgrade, do not change the values of **wal_level**, **max_connections**, **max_prepared_transactions**, and **max_locks_per_transaction**. If the value is changed, the instance fails to be started after the rollback.
+- You are advised to perform upgrade when the database system is idle. You can determine the time (for example, holidays) based on experience.
+- Before the upgrade, ensure that the database is normal. If your database was installed via PTK, you can run the `ptk cluster -n status` command to query the cluster status, Normal means that all instances of the cluster are available. If your database was installed via gs_om, you can run the `gs_om -t status` command to query the database status. If the value of cluster_state in the query result is Normal, the database is normal.
+- Ensure that the database mutual trust is normal before the upgrade. You can run the **ssh hostname** command on any node to connect to another node for verification. If no password is required for the interconnection between hosts, the mutual trust relationship is normal. (Generally, the mutual trust relationship is normal when the database is running properly.)
+- The database deployment mode (configuration files) cannot be changed before and after the upgrade. Before the upgrade, the deployment mode is verified. If the deployment mode is changed, an error is reported.
+- The database is running properly and data on the primary node has been fully synchronized to standby nodes.
+- Do not enable Kerberos during the upgrade.
+- A cluster that has CM enabled cannot be upgraded, but you can uninstall CM via PTK version 1.4.0 or above, and then upgrade the cluster.
+- The cluster stream replication parameter `enable_stream_replication` needs to be set to `on`.
+
+
+
+## Notes For Each Version
+
+### Current Version 3.0.X
+
+If the current database version is 3.0.X, you need to check for the existence of views that contain rownum and connect by syntax.
+
+You can get the view definition and check if it has a rownum or connect by syntax by using the following command:
+
+```sql
+select pg_get_viewdef('viewname') def where def like '%ROWNUM%' or def like '%CONNECT BY%' ;
+```
+
+If such a view exists, you need to do the following:
+
+1. Get the view definition.
+
+ ```sql
+ Select pg_get_viewdef('v1');
+ ```
+
+ `v1` represents the name of the view where the rownum or connect by syntax exists.
+
+2. Delete the related views.
+
+ ```sql
+ Drop view v1;
+ ```
+
+3. Rebuild these views using the original view definitions after the upgrade is complete.
+
+ ```sql
+ Create view as viewdef;
+ ```
+
+ `viewdef` represents the view definition queried in the first step.
+
+
+
+### Target Version 5.0.6
+
+MogDB 5.0.6 supports parallel import/export, which relies on the new built-in plugin tidrangescan. after the upgrade is completed, if you need to use gs_dump, gs_restore parallel import/export feature, you need to manually create the tidrangescan plugin in the database where you want to do the import/export:
+
+```sql
+create extension tidrangescan;
+```
\ No newline at end of file
diff --git a/product/en/docs-mogdb/v5.0/upgrade-guide/3-in-place-upgrade.md b/product/en/docs-mogdb/v5.0/upgrade-guide/3-in-place-upgrade.md
new file mode 100644
index 0000000000000000000000000000000000000000..f502979071b8ccad34187086f83f24ecaa69e247
--- /dev/null
+++ b/product/en/docs-mogdb/v5.0/upgrade-guide/3-in-place-upgrade.md
@@ -0,0 +1,132 @@
+---
+title: In-place Upgrade
+summary: In-place Upgrade
+author: 郭欢 候宗田 姚前
+date: 2024-05-30
+---
+
+# In-place Upgrade
+
+In-place upgrade means upgrading all nodes in the cluster at once and stopping the business during the upgrade.
+
+The most convenient and commonly used upgrade method is to use MogDB deployment and operation maintenance tool PTK. The process is simple and easy to operate, just put the new version of the package in the specified directory, and then execute the corresponding PTK commands, PTK will automatically complete all the checks (including the system, disk, and database status, etc.), perform backup operations, and then carry out upgrades or rollbacks.
+
+## Supported Upgrade Version
+
+MogDB supports upgrading **V3.0.0-V3.0.X** and **V5.0.0-V5.0.X** versions of databases to **V5.0.X** via PTK. Upgrading from a higher version to a lower version is not supported.
+
+## Backup Data
+
+In the upgrade process, to avoid the implementation of errors in the upgrade exception, resulting in the original version of the database files or data being accidentally modified, and can not be performed to roll back the operation of the situation, the upgrade must be done before the data backup and integrity protection, to facilitate the use of the upgraded data backed up when the upgrade error occurs restored to the state before the upgrade, to avoid operational errors resulting in the business can not be recovered.
+
+**In the process of upgrading with PTK, the tool will automatically complete the backup of the original version of the database software**, If you need to back up all the data files, you can use [gs_basebackup](../reference-guide/tool-reference/tools-used-in-the-internal-system/gs_basebackup.md) for the base physical backup, an example is as follows:
+
+1. Create a backup directory using the database user (e.g. omm)
+
+ ```shell
+ mkdir /home/omm/mogdb_data_bak
+ ```
+
+2. Backup via gs_basebackup
+
+ ```shell
+ gs_basebackup -D /home/omm/mogdb_data_bak -h 127.0.0.1 -p 26000
+ ```
+
+ The host name and port number need to be replaced according to the actual situation.
+
+## Upgrade Steps
+
+Before upgrading the database cluster, you need to check if the plug-in has been created for the current database cluster with the following command:
+
+```shell
+ptk cluster -n list-plugins
+```
+
+After execution, two tables will be output, the first table represents the list of installed plugins, installed does not mean used in the database.
+
+The second table represents the specific plugins that have been created in each database, if no plugins have been created, the Extension(s) field will be empty.
+
+We need to make sure that there is a value under the Extension(s) field in the second table, the upgrade command is different in different cases.
+
+### No Plugin Created
+
+If no plug-ins have been created in the database prior to the upgrade, you can directly specify the new version of the installation package for the upgrade:
+
+```shell
+ptk cluster -n upgrade [-y] -p
+```
+
+### Plugin Created
+
+If a plugin is used in the database, it may cause the plugin to be unavailable after the upgrade or the upgrade to fail because the database metadata will change after the upgrade.
+
+- `--plugin-dir`: The local directory, which holds the pre-downloaded new version of the plugin package (! Please do not change the file name of the downloaded plugin package)
+
+- `--plugin-upgrade-patch`: SQL patch package required for plugin upgrade (this parameter does not need to be specified when the target version is **MogDB 5.0.2 or later**)
+
+The upgrade command is as follows:
+
+```shell
+ptk cluster -n upgrade [-y] -p --plugin-dir
+```
+
+>  Note: The plug-in version must match with the database version. If a plugin is included, when the database is upgraded, the plugin must be upgraded as well.
+
+## Upgrade Commit
+
+After executing the above commands, PTK will complete the complete operation of the upgrade. After the upgrade, the cluster runs with the new version, at this time, you can verify the operation of the database. When you check the cluster status is normal after the upgrade, you can submit the upgrade by using the following commands to enable the cluster read/write features and delete the backup files of the old version. Note that the cluster cannot be rolled back after the commit, so please make sure it is correct before committing.
+
+```shell
+ptk cluster -n upgrade-commit
+```
+
+After commit, you can check the cluster status with the following command:
+
+```shell
+ptk cluster -n status
+```
+
+## Upgrade Rollback & Data Recovery
+
+If there is an error interruption during the upgrade process, you can solve the problem by human intervention. When the problem is solved, you can continue to complete the upgrade by re-executing the upgrade command.
+
+If you find a problem after upgrading, you can roll back the cluster by using the upgrade-rollback command, and PTK will roll back the cluster to the old version of the state.
+
+```shell
+ptk cluster -n upgrade-rollback
+```
+
+If an exception occurs during the upgrade process and you need to restore from backup data, you can perform the following operations:
+
+1. Stop the database
+
+ ```shell
+ gs_ctl stop -D $PGDATA
+ ```
+
+2. Clean up all or part of the data files in the original database
+
+ ```shell
+ rm -rf $PGDATA/*
+ ```
+
+3. Restore the required database files from a backup as database system user
+
+ ```shell
+ cp -r /home/omm/mogdb_data_bak/* $PGDATA/
+ ```
+
+4. If there is a linked file in the database, it needs to be modified so that it links to the correct file
+
+5. Restart the database server and check the database contents to ensure that the database has been restored to normal state
+
+ ```shell
+ gs_ctl start -D $PGDATA
+ ```
+
+## Notes
+
+If you find that the above upgrade operation does not work as expected, for example, the status information is abnormal when displaying the cluster status, you need to contact our engineers to solve the problem.
+
+Please verify that all database statuses are correct after the upgrade before performing the upgrade commit operation. If the statuses are incorrect, you need to roll back the operation to ensure that the database is restored to the correct status before the upgrade, and then contact our engineers to confirm the problems encountered during the upgrade.
\ No newline at end of file
diff --git a/product/en/docs-mogdb/v5.0/upgrade-guide/4-rolling-upgrade.md b/product/en/docs-mogdb/v5.0/upgrade-guide/4-rolling-upgrade.md
new file mode 100644
index 0000000000000000000000000000000000000000..3634fd4e2e7d8575b5da4683103191785669da96
--- /dev/null
+++ b/product/en/docs-mogdb/v5.0/upgrade-guide/4-rolling-upgrade.md
@@ -0,0 +1,114 @@
+---
+title: Rolling Upgrade
+summary: Rolling Upgrade
+author: 郭欢 候宗田 姚前
+date: 2024-05-17
+---
+
+# Rolling Upgrade
+
+Rolling upgrade does not require all nodes to be down, but can be realized while external services are being upgraded.
+
+PTK 1.4.0 and above support rolling upgrade, but since the rolling upgrade process always upgrades the standby node and does not directly upgrade the primary node, you cannot submit any SQL during the upgrade process, and cannot upgrade database with plugins.
+
+## Supported Upgrade Version
+
+Rolling upgrades only support upgrades between versions with no changes in metadata, i.e., the kernel version of the database must be the same before and after the upgrade. The output of `Number` field by running `ptk candidate db` is the kernel version number (requires PTK 1.4.0 or later).
+
+```sql
+# ptk candidate db
+ Software | Version | Number | Lifecycle Policy | Release Date
+------------+---------+--------+------------------+---------------
+ MogDB | 2.0.0 | 92.298 | LTS | 2021-05-25
+ | 2.0.1 | 92.299 | LTS | 2021-07-08
+ | 2.0.3 | 92.300 | LTS | 2022-06-29
+ | 2.0.4 | 92.302 | LTS | 2022-10-15
+ | 2.1.1 | 92.421 | Preview | 2022-03-22
+ | 3.0.0 | 92.605 | LTS | 2022-06-30
+ | 3.0.1 | 92.605 | LTS | 2022-07-30
+ | 3.0.2 | 92.605 | LTS | 2022-09-16
+ | 3.0.3 | 92.605 | LTS | 2022-10-31
+ | 3.0.4 | 92.605 | LTS | 2023-03-24
+ | 3.0.5 | 92.607 | LTS | 2023-07-20
+ | 3.0.6 | 92.607 | LTS | 2023-09-15
+ | 3.0.7 | 92.607 | LTS | 2023-12-29
+ | 3.1.0 | 92.781 | Preview | 2022-12-30
+ | 3.1.1 | 92.781 | LTS | 2023-11-26
+ | 5.0.0 | 92.848 | LTS | 2023-07-14
+ | 5.0.1 | 92.850 | LTS | 2023-08-15
+ | 5.0.2 | 92.900 | LTS | 2023-09-30
+ | 5.0.3 | 92.900 | LTS | 2023-10-27
+ | 5.0.4 | 92.901 | LTS | 2023-11-30
+ | 5.0.5 | 92.901 | LTS | 2023-12-30
+ | 5.0.6 | 92.920 | LTS | 2024-03-30
+```
+
+## Backup Data
+
+In the upgrade process, to avoid the implementation of errors in the upgrade exception, resulting in the original version of the database files or data being accidentally modified, and can not be performed to roll back the operation of the situation, the upgrade must be done before the data backup and integrity protection, to facilitate the use of the upgraded data backed up when the upgrade error occurs restored to the state before the upgrade, to avoid operational errors resulting in the business can not be recovered.
+
+**In the process of upgrading with PTK, the tool will automatically complete the backup of the original version of the database software**, If you need to back up all the data files, you can use [gs_basebackup](../reference-guide/tool-reference/tools-used-in-the-internal-system/gs_basebackup.md) for the base physical backup, an example is as follows:
+
+1. Create a backup directory using the database user (e.g. omm)
+
+ ```shell
+ mkdir /home/omm/mogdb_data_bak
+ ```
+
+2. Backup via gs_basebackup
+
+ ```shell
+ gs_basebackup -D /home/omm/mogdb_data_bak -h 127.0.0.1 -p 26000
+ ```
+
+ The host name and port number need to be replaced according to the actual situation.
+
+## Upgrade Steps
+
+Take one primary and one standby as an example, assume that the primary IP is `IP1` and the standby IP is `IP2` in the initial state.
+
+1. Check if the machine status is `Normal`.
+
+ ```shell
+ ptk cluster -n status
+ ```
+
+2. Upgrade standby node in the cluster.
+
+ Perform a single-node upgrade of a standby node in the cluster with the `-H` parameter, and the node should be able to temporarily switchover to the primary node to provide services.
+
+ ```shell
+ ptk cluster -n upgrade -p -H
+ ```
+
+3. Perform primary/standby nodes switchover.
+
+ Switch the upgraded standby node to the primary node and demote the original primary node to the standby node.
+
+ ```shell
+ ptk cluster -n switchover -H
+ ```
+
+4. Upgrade the original primary node.
+
+ ```shell
+ ptk cluster -n upgrade -p -H
+ ```
+
+5. (Optional) Re-switch the primary node to the original primary machine.
+
+ ```shell
+ ptk cluster -n switchover -H
+ ```
+
+6. Upgrade commit.
+
+ ```shell
+ ptk cluster -n upgrade-commit
+ ```
+
+## Notes
+
+There will be scenarios where different versions of the primary and standby nodes are running at the same time, so you should make sure that there are no changes in metadata and log file formats between the old and new versions when using a rolling upgrade.
+
+Please make a good data backup in advance, so that you can roll back to the pre-upgrade state if you encounter problems, and then feedback the problems encountered to our engineers.
\ No newline at end of file
diff --git a/product/en/docs-mogdb/v5.0/upgrade-guide/upgrade-guide.md b/product/en/docs-mogdb/v5.0/upgrade-guide/upgrade-guide.md
new file mode 100644
index 0000000000000000000000000000000000000000..be8fcbd4a36d28f80d4d775d9701523aff99f731
--- /dev/null
+++ b/product/en/docs-mogdb/v5.0/upgrade-guide/upgrade-guide.md
@@ -0,0 +1,13 @@
+---
+title: Upgrade Guide
+summary: Upgrade Guide
+author: guo huan
+date: 2024-05-17
+---
+
+# Upgrade Guide
+
+- **[Upgrade Overview](./1-upgrade-overview.md)**
+- **[Read Before Upgrade](./2-read-before-upgrade.md)**
+- **[In-place Upgrade](./3-in-place-upgrade.md)**
+- **[Rolling Upgrade](./4-rolling-upgrade.md)**
\ No newline at end of file
diff --git a/product/en/docs-mogdb/v6.0/_index.md b/product/en/docs-mogdb/v6.0/_index.md
index 7f262a2a665f0d324f4f002cd3dbe7e4deada514..176d62e2c03e21f062939cccf008fdb00f84bcb9 100644
--- a/product/en/docs-mogdb/v6.0/_index.md
+++ b/product/en/docs-mogdb/v6.0/_index.md
@@ -47,7 +47,7 @@ date: 2022-08-07
[Backup and Restoration](./administrator-guide/backup-and-restoration/backup-and-restoration.md)
-[Upgrade Guide](./administrator-guide/upgrade-guide.md)
+[Upgrade Guide](./upgrade-guide/upgrade-guide.md)
[Common Fault Locating Methods](./common-faults-and-identification/common-fault-locating-methods.md)
diff --git a/product/en/docs-mogdb/v6.0/administrator-guide/administrator-guide.md b/product/en/docs-mogdb/v6.0/administrator-guide/administrator-guide.md
index 2d595cd0ad77eb8c45475cc3d83db163a2d2f566..4eedb25b088e408280f0beb369f552f230b0feb0 100644
--- a/product/en/docs-mogdb/v6.0/administrator-guide/administrator-guide.md
+++ b/product/en/docs-mogdb/v6.0/administrator-guide/administrator-guide.md
@@ -14,5 +14,4 @@ date: 2023-05-22
- **[Column-store Tables Management](column-store-tables-management.md)**
- **[Backup and Restoration](backup-and-restoration/backup-and-restoration.md)**
- **[Database Deployment Solutions](database-deployment-scenario/database-deployment-scenario.md)**
-- **[Importing And Exporting Data](importing-and-exporting-data/importing-and-exporting-data.md)**
-- **[Upgrade Guide](upgrade-guide.md)**
\ No newline at end of file
+- **[Importing And Exporting Data](importing-and-exporting-data/importing-and-exporting-data.md)**
\ No newline at end of file
diff --git a/product/en/docs-mogdb/v6.0/administrator-guide/upgrade-guide.md b/product/en/docs-mogdb/v6.0/administrator-guide/upgrade-guide.md
deleted file mode 100644
index 9153919cfd0b927b91d014f1065b59422221333c..0000000000000000000000000000000000000000
--- a/product/en/docs-mogdb/v6.0/administrator-guide/upgrade-guide.md
+++ /dev/null
@@ -1,375 +0,0 @@
----
-title: Upgrade Guide
-summary: Upgrade Guide
-author: Zhang Cuiping
-date: 2021-09-27
----
-
-# Upgrade Guide
-
-## Overview
-
-This document provides guidance on version upgrade and rollback process. It also offers common problem resolving and troubleshooting methods.
-
-## Intended Audience
-
-This document is mainly intended for upgrade operators. They must have the following experience and skills:
-
-- Be familiar with the networking of the current network and versions of related NEs (network elements).
-- Have maintenance experience of the related devices and be familiar with their operation and maintenance methods.
-
-## Upgrade Scheme
-
-This section provides guidance on selection of the upgrade modes.
-
-The user determines whether to upgrade the current system according to the new features of MogDB and database situations.
-
-The supported upgrade modes include in-place upgrade and gray upgrade. The upgrade strategies include major upgrade and minor upgrade.
-
-After the upgrade mode is determined, the system will automatically determine and choose the suitable upgrade strategy.
-
-* In-place upgrade: All services need to be stopped during the upgrade. All nodes are upgraded at a time.
-
-* Gray upgrade: supports full-service operations. All nodes are also upgraded at a time. (Currently, only the gray upgrade from version 1.1.0 to 2.0 and above is supported.)
-
-## Version Requirements Before the Upgrade (Upgrade Path)
-
-[Table 1](#biaoyi) lists the MogDB upgrade version requirements.
-
-**Table 1** Version requirements before the upgrade (upgrade path)
-
-| Version | Description |
-| --------- | ------------------------------------------------------- |
-| MogDB 2.0 | Need to upgrade to MogDB 2.1, then upgrade to MogDB 3.0 |
-| MogDB 2.1 | Upgradeable to MogDB 3.0 |
-
->  **NOTE:** You can run the following command to check the version before the upgrade:
->
-> ```bash
-> gsql -V | --version
-> ```
-
-## Impact and Constraints
-
-The following precautions need to be considered during the upgrade:
-
-- The upgrade cannot be performed with capacity expansion and reduction concurrently.
-- VIP (virtual IP) is not supported.
-- During the upgrade, you are not allowed to modify the **wal_level**, **max_connections**, **max_prepared_transactions**, and **max_locks_per_transaction** GUC parameters. Otherwise, the instance will be started abnormally after rollback.
-- It is recommended that the upgrade is performed when the database system is under the light workload. You can determine the off-peak hours according to your experience, such as holidays and festivals.
-- Before the upgrade, make sure that the database is normal. You can run the **gs_om -t status** command to check the database status. If the returned value of **cluster_state** is **Normal**, the database is normal.
-- Before the upgrade, make sure that mutual trust is established between database nodes. You can run the **ssh hostname** command on any node to connect to another node to verify whether the mutual trust has been established. If mutual connection between any two nodes does not require a password, the mutual trust is normal. (Generally, when the database status is normal, mutual trust is normal.)
-- Before and after the upgrade, the database deployment mode must be kept consistent. Before the upgrade, the database deployment mode will be verified. If it is changed after the upgrade, an error will occur.
-- Before the upgrade, make sure that the OS is normal. You can check the OS status using the **gs_checkos** tool.
-- In-place upgrade requires stopping of services. Gray upgrade supports full-service operations.
-- The database is running normally and the data of the primary domain name (DN) is fully synchronized to the standby DN.
-- During the upgrade, the kerberos is not allowed to be enabled.
-- You are not allowed to modify the **version.cfg** file decompressed from the installation package.
-- During the upgrade, if an error causes upgrade failure, you need to perform rollback operations manually. The next upgrade can be performed only after the rollback is successful.
-- After the rollback, if the next upgrade is successful, GUC parameters set before the upgrade is submitted will become invalid.
-- During the upgrade, you are not allowed to set GUC parameters manually.
-- During the gray upgrade, service interruption will occur and lasts less than 10s.
-- During the upgrade, OM operations can be performed only when the kernel and OM versions are consistent. This consistency refers that the kernel code and OM code are from the same software package. If the pre-installation script of the installation package is executed but the upgrade is not performed, or the pre-installation script of the baseline package after the rollback is not performed, the kernel code will be inconsistent with the OM code.
-- During the upgrade, if new fields are added to a system table but they cannot be found by running the **\d** command after the upgrade, you can run the **select** command to check the new fields.
-- The upgrade is allowed only when the value of **enable_stream_replication** is **on**.
-- During the gray upgrade, the number of concurrent read/write services must be less than 200.
-- If the MOT is used in MogDB 1.1.0, MogDB 1.1.0 cannot be upgraded to MogDB 2.0.
-
-## Upgrade Process
-
-This section describes the upgrade process.
-
-**Figure 1** Upgrade process
-
-
-
-> **NOTE:** The time listed in the following table is for reference only. The actual time required depends on the upgrade environment.
-
-**Table 2** Estimated upgrade efficiency
-
- Procedure | Recommended Start Time | Time Required (Day/Hour/Minute) | Service Interruption Time | Remarks |
Perform the pre-upgrade preparations and check operations. | One day before the upgrade | About 2 to 3 hours | No impact on services | Pre-upgrade check, data backup, and software package verification |
Perform the upgrade. | Off-peak hours | The time is mainly spent in starting and stopping the database and modifying the system table of each database. The upgrade usually takes less than 30 minutes. | The service interruption time is the same as the upgrade time. Generally, the time taken is not greater than 30 minutes. | Performed based on the Upgrade Guide |
Verify the upgrade. | Off-peak hours | About 30 minutes | The service interruption time is the same as the upgrade verification time, about 30 minutes. | - |
Submit the upgrade. | Off-peak hours | The upgrade submission usually takes less than 10 minutes. | The service interruption time is the same as the upgrade submission time. Generally, the time taken is not greater than 10 minutes. | - |
Roll back the upgrade. | Off-peak hours | The rollback usually takes less than 30 minutes. | The service interruption time is the same as the rollback time. Generally, the time taken is not greater than 30 minutes. | - |
-
-## Pre-Upgrade Preparations and Check
-
-### Pre-Upgrade Preparations and Checklist
-
-**Table 3** Pre-upgrade preparations and checklist
-
- No. | Item to Be Prepared for the Upgrade | Preparation Content | Recommended Start Time | Time Required (Day/Hour/Minute) |
1 | Collect node information. | Obtain the name, IP address, and passwords of users root and omm of related database nodes | One day before the upgrade | 1 hour |
2 | Set remote login as user root. | Set the configuration file that allows remote login as user root | One day before the upgrade | 2 hours |
3 | Back up data. | For details, see the Backup and Restoration section in the Administrator Guide. | One day before the upgrade | The time taken varies depends on the volume of data to be backed up and the backup strategy. |
4 | Obtain and verify the installation package. | Obtain the installation package and verify the package integrity. | One day before the upgrade | 0.5 hour |
5 | Perform the health check. | Check the OS status using the gs_checkos tool | One day before the upgrade | 0.5 hour |
6 | Check the disk usage of each database node. | Check the disk usage by running the df command. | One day before the upgrade | 0.5 hour |
7 | Check the database status. | Check the database status using the gs_om tool. | One day before the upgrade | 0.5 hour |
-
-> **NOTE:** **Time Required** varies depends on the environment, including data volume, server performance, and other factors.
-
-### Collecting Node Information
-
-You can contact the system administrator to obtain the environment information, such as name, IP address, and passwords of users **root** and **omm** of the database node.
-
-**Table 4** Node information
-
-
-
- No. |
- Node Name |
- IP Address of the Node |
-
-Password of User root |
- Password of User omm |
- Remarks |
-
-
-1 |
-
-- |
-
-- |
- - |
- - |
- - |
-
-
-
-### Backing Up Data
-
-Once the upgrade fails, services will be affected. Therefore, you need to back up data in advance so that services can be quickly restored once the risk occurs.
-
-For details about data backup, see the **Backup and Restoration** section in the *Administrator Guide*.
-
-### Obtaining the Installation Package
-
-You can obtain the installation package from [this website](https://www.mogdb.io/en/downloads/mogdb/).
-
-### Performing the Health Check
-
-The **gs_checkos** tool can be used to check the OS status.
-
-**Prerequisites**
-
-- The current hardware and network environment is normal.
-- The mutual trust between the **root** users of all hosts is normal.
-- The **gs_checkos** command can be executed only as user **root**.
-
-**Procedure**
-
-1. Log in to the primary database node as user **root**.
-
-2. Run the following command to check the server OS parameters:
-
- ```
- # gs_checkos -i A
- ```
-
- Checking the OS parameters aims to ensure that the database can be pre-installed normally and can be run safely and efficiently after being installed.
-
-#### Checking the Disk Usage of the Database Node
-
-It is recommended that the upgrade is performed when the disk usage of the database node is less than 80%.
-
-#### Checking the Database Status
-
-This section introduces how to check the database status.
-
-**Procedure**
-
-1. Log in to the primary database node as user **omm** and run the **source** command to reload environment variables.
-
- ```
- # su - omm
- $ source /home/omm/.bashrc
- ```
-
-2. Run the following command to check the database status:
-
- ```bash
- gs_om -t status
- ```
-
-3. Ensure that the database status is normal.
-
-## Upgrade Procedure
-
-This section introduces details about in-place upgrade and gray upgrade.
-
-**Procedure**
-
-1. Log in to the primary database node as user **root**.
-
-2. Create a directory for storing the new package.
-
- ```
- # mkdir -p /opt/software/mogdb_upgrade
- ```
-
-3. Upload the new package to the **/opt/software/mogdb_upgrade** directory and decompress the package.
-
-4. Found the **script** file.
-
- ```
- # cd /opt/software/mogdb_upgrade/script
- ```
-
-5. Create **static** folder, put the plugin package into **script/static** folder. (This step is a necessary operation, because the current version does not determine whether the user has used plugins, so the default database in the upgrade script to install the use of plugins, later versions will be a separate part of the plugin split out.)
-
- For example:
-
- ```sql
- mkdir static
- cd static/
- wget https://cdn-mogdb.enmotech.com/mogdb-media/3.0.1/Plugins-3.0.1-CentOS-x86_64.tar.gz
- ```
-
-6. Before the in-place or gray upgrade, execute the pre-installation script by running the **gs_preinstall** command.
-
- ```
- # ./gs_preinstall -U omm -G dbgrp -X /opt/software/mogdb/clusterconfig.xml
- ```
-
-7. Switch to user **omm**.
-
- ```
- # su - omm
- ```
-
-8. After ensuring that the database status is normal, run the required command to perform the in-place upgrade or gray upgrade.
-
- Example one: Execute the **gs_upgradectl** script to perform the in-place upgrade.
-
- ```bash
- gs_upgradectl -t auto-upgrade -X /opt/software/mogdb/clusterconfig.xml
- ```
-
- Example two: Execute the **gs_upgradectl** script to perform the gray upgrade.
-
- ```bash
- gs_upgradectl -t auto-upgrade -X /opt/software/mogdb/clusterconfig.xml --grey
- ```
-
-## Upgrade Verification
-
-This section introduces upgrade verification and provides detailed use cases and operations.
-
-### Verifying the Checklist of the Project
-
-**Table 5** Verification item checklist
-
- No. | Verification Item | Check Standard | Check Result |
1 | Version check | Check whether the version is correct after the upgrade. | - |
2 | Health check | Use the gs_checkos tool to check the OS status. | - |
3 | Database status | Use the gs_om tool to check the database status. | - |
-
-### Querying the Upgrade Version
-
-This section introduces how to check the version.
-
-**Procedure**
-
-1. Log in to the primary database node as user **omm** and run the **source** command to reload environment variables.
-
- ```
- # su - omm
- $ source /home/omm/.bashrc
- ```
-
-2. Run the following command to check the version information of all nodes:
-
- ```bash
- gs_ssh -c "gsql -V"
- ```
-
-### Checking the Database Status
-
-This section introduces how to check the database status.
-
-**Procedure**
-
-1. Log in to the primary database node as user **omm**.
-
- ```
- # su - omm
- ```
-
-2. Run the following command to check the database status:
-
- ```bash
- gs_om -t status
- ```
-
- If the value of **cluster_state** is **Normal**, the database is normal.
-
-## Upgrade Submission
-
-After the upgrade, if the verification is successful, the subsequent operation is to submit the upgrade.
-
->  **NOTE:** Once the upgrade is submitted, it cannot be rolled back.
-
-**Procedure**
-
-1. Log in to the primary database node as user **omm**.
-
- ```
- # su - omm
- ```
-
-2. Run the following command to submit the upgrade:
-
- ```bash
- gs_upgradectl -t commit-upgrade -X /opt/software/mogdb/clusterconfig.xml
- ```
-
-3. Reset the control file format to be compatible with the new ustore storage engine added in version 2.1.0 (2.0.1 upgrade to 2.1 only).
-
- >  **CAUTION**:
- >
- > - This operation is not reversible and cannot be downgraded back to version 2.0.1 after execution.
- > - Before performing this operation, it is recommended to make a full data backup by referring to [Logical Backup Recovery](../administrator-guide/backup-and-restoration/logical-backup-and-restoration.md).
-
- ```
- pg_resetxlog -f $PGDATA
- ```
-
- The echo appear as follow:
-
- ```
- Transaction log reset
- ```
-
-## Version Rollback
-
-This section introduces how to roll back the upgrade.
-
-**Procedure**
-
-1. Log in to the primary database node as user **omm**.
-
- ```
- # su - omm
- ```
-
-2. Run the following command to perform the rollback operation (rolling back the kernel code). After the rollback, if you need to keep the versions of the kernel code and OM code consistent, execute the pre-installation script in the old package. (For details, see the [execute the pre-installtion script](#qianzhijiaoben) step.)
-
- ```bash
- gs_upgradectl -t auto-rollback -X /opt/software/mogdb/clusterconfig.xml
- ```
-
- >  **NOTE:** If the database is abnormal, run the following command to perform the forcible rollback operation:
- >
- > ```bash
- > gs_upgradectl -t auto-rollback -X /opt/software/mogdb/clusterconfig.xml --force
- > ```
-
-3. Check the version after the rollback.
-
- ```bash
- gs_om -V | --version
- ```
-
- If the upgrade fails, perform the following operations to resolve the issue:
-
- a. Check whether the environment is abnormal.
-
- For example, the disk is fully occupied, the network is faulty, or the installation package or upgrade version is incorrect. After the problem is located and resolved, try to perform the upgrade again.
-
- b. If no environment issue is found or the upgrade fails again, collect related logs and contact technical engineers.
-
- Run the following command to collect logs:
-
- ```bash
- gs_collector -begin-time='20200724 00:00' -end-time='20200725 00:00'
- ```
-
- If permitted, you are advised to retain the environment.
diff --git a/product/en/docs-mogdb/v6.0/characteristic-description/characteristic-description-overview.md b/product/en/docs-mogdb/v6.0/characteristic-description/characteristic-description-overview.md
index 8787f828371d9586ecfabdc4a266cd1cd6215606..a733e828fc8e7f38d25ff709c7cfea0feec34363 100644
--- a/product/en/docs-mogdb/v6.0/characteristic-description/characteristic-description-overview.md
+++ b/product/en/docs-mogdb/v6.0/characteristic-description/characteristic-description-overview.md
@@ -50,7 +50,6 @@ MogDB 5.0 has the following characteristics.
+ [Two-City Three-DC DR](./high-availability/17-two-city-three-dc-dr.md)
+ [CM Cluster Management Component Supporting Two Node Deployment](./high-availability/cm-cluster-management-component-supporting-two-node-deployment.md)
+ Maintainability
- + [Gray Upgrade](./maintainability/1-gray-upgrade.md)
+ [Workload Diagnosis Report (WDR)](./maintainability/2-workload-diagnosis-report.md)
+ [Slow SQL Diagnosis](./maintainability/3-slow-sql-diagnosis.md)
+ [Session Performance Diagnosis](./maintainability/4-session-performance-diagnosis.md)
diff --git a/product/en/docs-mogdb/v6.0/characteristic-description/maintainability/1-gray-upgrade.md b/product/en/docs-mogdb/v6.0/characteristic-description/maintainability/1-gray-upgrade.md
deleted file mode 100644
index 5b5110cb351901333be672b8c73297f74cd138fd..0000000000000000000000000000000000000000
--- a/product/en/docs-mogdb/v6.0/characteristic-description/maintainability/1-gray-upgrade.md
+++ /dev/null
@@ -1,40 +0,0 @@
----
-title: Gray Upgrade
-summary: Gray Upgrade
-author: Guo Huan
-date: 2022-05-07
----
-
-# Gray Upgrade
-
-## Availability
-
-This feature is available since MogDB 2.0.0.
-
-## Introduction
-
-Gray upgrade supports full-service operations. All nodes can be upgraded at a time.
-
-## Benefits
-
-Gray upgrade provides an online upgrade mode to ensure that all nodes are upgraded without interrupting services.
-
-## Description
-
-Gray upgrade is an online upgrade mode that upgrades all nodes. If only the binary files of the database need to be replaced during the gray upgrade, to minimize the impact on services, the two sets of binary files exist on the same node at the same time, and the soft connection switchover mode is used to switch the process version (one intermittent disconnection within 10 seconds).
-
-## Enhancements
-
-None.
-
-## Constraints
-
-For details about the gray upgrade constraints, see [Upgrade Guide](../../administrator-guide/upgrade-guide.md) in *Administrator Guide*.
-
-## Dependencies
-
-None.
-
-## Related Pages
-
-[Upgrade Guide](../../administrator-guide/upgrade-guide.md)
\ No newline at end of file
diff --git a/product/en/docs-mogdb/v6.0/characteristic-description/maintainability/maintainability.md b/product/en/docs-mogdb/v6.0/characteristic-description/maintainability/maintainability.md
index 4d4547919cc844575a87bb67af4fc60fe88909d9..792d95a5ffe51c54ae87a1f857bf24b787fed413 100644
--- a/product/en/docs-mogdb/v6.0/characteristic-description/maintainability/maintainability.md
+++ b/product/en/docs-mogdb/v6.0/characteristic-description/maintainability/maintainability.md
@@ -7,7 +7,6 @@ date: 2023-05-22
# Maintainability
-+ **[Gray Upgrade](1-gray-upgrade.md)**
+ **[WDR](2-workload-diagnosis-report.md)**
+ **[Slow SQL Diagnosis](3-slow-sql-diagnosis.md)**
+ **[Session Performance Diagnosis](4-session-performance-diagnosis.md)**
diff --git a/product/en/docs-mogdb/v6.0/reference-guide/sql-syntax/CREATE-DATABASE.md b/product/en/docs-mogdb/v6.0/reference-guide/sql-syntax/CREATE-DATABASE.md
index eba7ea62b5fa188124c144bcd6e8f051b01c2053..23a5e1919026f420f37622e6c992e3aa8a20fafd 100644
--- a/product/en/docs-mogdb/v6.0/reference-guide/sql-syntax/CREATE-DATABASE.md
+++ b/product/en/docs-mogdb/v6.0/reference-guide/sql-syntax/CREATE-DATABASE.md
@@ -136,7 +136,7 @@ CreateDatabase ::= CREATE DATABASE [IF NOT EXISTS] database_name
- **DBCOMPATIBILITY [ = ] compatibility_type**
- Specifies the compatible database type. The default value is **O**.
+ Specifies the compatible database type. The default compatible database is Oracle.
Value range: **A**, **B** and **PG**, indicating Oracle, MySQL and Postgres databases, respectively.
diff --git a/product/en/docs-mogdb/v6.0/toc.md b/product/en/docs-mogdb/v6.0/toc.md
index 8332e74c990d767148082726c0f26bc31c7f2e03..3bc84358093ec9ce15822ad4ba6710fa4e99c0a3 100644
--- a/product/en/docs-mogdb/v6.0/toc.md
+++ b/product/en/docs-mogdb/v6.0/toc.md
@@ -87,7 +87,6 @@
+ [CM Cluster Management Component Supporting Two Node Deployment](/characteristic-description/high-availability/cm-cluster-management-component-supporting-two-node-deployment.md)
+ [Query of the Original DDL Statement for a View](/characteristic-description/high-availability/ddl-query-of-view.md)
+ [Maintainability](/characteristic-description/maintainability/maintainability.md)
- + [Gray Upgrade](/characteristic-description/maintainability/1-gray-upgrade.md)
+ [Workload Diagnosis Report (WDR)](/characteristic-description/maintainability/2-workload-diagnosis-report.md)
+ [Slow SQL Diagnosis](/characteristic-description/maintainability/3-slow-sql-diagnosis.md)
+ [Session Performance Diagnosis](/characteristic-description/maintainability/4-session-performance-diagnosis.md)
@@ -198,6 +197,11 @@
+ [PTK-based Installation](/installation-guide/ptk-based-installation.md)
+ [Manual Installation](/installation-guide/manual-installation.md)
+ [Recommended Parameter Settings](/installation-guide/recommended-parameter-settings.md)
++ [Upgrade Guide](/upgrade-guide/upgrade-guide.md)
+ + [Upgrade Overview](/upgrade-guide/1-upgrade-overview.md)
+ + [Read Before Upgrade](/upgrade-guide/2-read-before-upgrade.md)
+ + [In-place Upgrade](/upgrade-guide/3-in-place-upgrade.md)
+ + [Rolling Upgrade](/upgrade-guide/4-rolling-upgrade.md)
+ [Administrator Guide](/administrator-guide/administrator-guide.md)
+ [Localization](/administrator-guide/localization/localization.md)
+ [Locale Support](/administrator-guide/localization/locale-support.md)
@@ -276,7 +280,6 @@
+ [Exporting a Single Database](/administrator-guide/importing-and-exporting-data/exporting-data/2-exporting-a-single-database.md)
+ [Exporting All Databases](/administrator-guide/importing-and-exporting-data/exporting-data/3-exporting-all-databases.md)
+ [Data Export By a User Without Required Permissions](/administrator-guide/importing-and-exporting-data/exporting-data/4-data-export-by-a-user-without-required-permissions.md)
- + [Upgrade Guide](/administrator-guide/upgrade-guide.md)
+ [High Available Guide](./high-available-guide/high-available-guide.md)
+ [DCF(Distributed Consensus Framework)](./high-available-guide/high-available-dcf.md)
+ [CM(Cluster Manager)](./high-available-guide/cluster-management/cluster-management.md)
diff --git a/product/en/docs-mogdb/v6.0/toc_characteristic_description.md b/product/en/docs-mogdb/v6.0/toc_characteristic_description.md
index a11f0ecc9e4163c9eac532fe9de73e68c9dfb72d..3ba5c9cd553f8b661fb3f05db6a0f434da550a73 100644
--- a/product/en/docs-mogdb/v6.0/toc_characteristic_description.md
+++ b/product/en/docs-mogdb/v6.0/toc_characteristic_description.md
@@ -50,7 +50,6 @@
+ [CM Cluster Management Component Supporting Two Node Deployment](/characteristic-description/high-availability/cm-cluster-management-component-supporting-two-node-deployment.md)
+ [Query of the Original DDL Statement for a View](/characteristic-description/high-availability/ddl-query-of-view.md)
+ [Maintainability](/characteristic-description/maintainability/maintainability.md)
- + [Gray Upgrade](/characteristic-description/maintainability/1-gray-upgrade.md)
+ [Workload Diagnosis Report (WDR)](/characteristic-description/maintainability/2-workload-diagnosis-report.md)
+ [Slow SQL Diagnosis](/characteristic-description/maintainability/3-slow-sql-diagnosis.md)
+ [Session Performance Diagnosis](/characteristic-description/maintainability/4-session-performance-diagnosis.md)
diff --git a/product/en/docs-mogdb/v6.0/toc_manage.md b/product/en/docs-mogdb/v6.0/toc_manage.md
index 1c0ce899e42c768a7cc039687a649b9e7867dd36..f5bf9f8cf3f3e952d0aee9e42c10ad613995480f 100644
--- a/product/en/docs-mogdb/v6.0/toc_manage.md
+++ b/product/en/docs-mogdb/v6.0/toc_manage.md
@@ -81,4 +81,3 @@
+ [Exporting a Single Database](/administrator-guide/importing-and-exporting-data/exporting-data/2-exporting-a-single-database.md)
+ [Exporting All Databases](/administrator-guide/importing-and-exporting-data/exporting-data/3-exporting-all-databases.md)
+ [Data Export By a User Without Required Permissions](/administrator-guide/importing-and-exporting-data/exporting-data/4-data-export-by-a-user-without-required-permissions.md)
-+ [Upgrade Guide](/administrator-guide/upgrade-guide.md)
diff --git a/product/en/docs-mogdb/v6.0/toc_upgrade.md b/product/en/docs-mogdb/v6.0/toc_upgrade.md
new file mode 100644
index 0000000000000000000000000000000000000000..fd812c9193b1a00754d8662dbcb7c1efd5bfa4b1
--- /dev/null
+++ b/product/en/docs-mogdb/v6.0/toc_upgrade.md
@@ -0,0 +1,10 @@
+
+
+# MogDB Documentation 6.0
+
+## Upgrade Guide
+
++ [Upgrade Overview](./upgrade-guide/1-upgrade-overview.md)
++ [Read Before Upgrade](./upgrade-guide/2-read-before-upgrade.md)
++ [In-place Upgrade](./upgrade-guide/3-in-place-upgrade.md)
++ [Rolling Upgrade](./upgrade-guide/4-rolling-upgrade.md)
\ No newline at end of file
diff --git a/product/en/docs-mogdb/v6.0/upgrade-guide/1-upgrade-overview.md b/product/en/docs-mogdb/v6.0/upgrade-guide/1-upgrade-overview.md
new file mode 100644
index 0000000000000000000000000000000000000000..5737d214d1951226e9f72f96343218217089e2d7
--- /dev/null
+++ b/product/en/docs-mogdb/v6.0/upgrade-guide/1-upgrade-overview.md
@@ -0,0 +1,29 @@
+---
+title: Upgrade Overview
+summary: Upgrade Overview
+author: 郭欢
+date: 2024-05-17
+---
+
+# Upgrade Overview
+
+When a new version of the database is released and users decide to use the new version of the database based on the release information, they need to do an upgrade operation. Cluster upgrade refers to directly upgrading the database binaries and metadata to a higher version on the basis of an existing cluster without exporting data.
+
+This document is intended for upgrade personnel, who must:
+
+- Understand version information about the current device and related NEs.
+- Have experience in maintaining and operating these devices.
+
+
+
+## Upgrade Schemes
+
+There are two upgrade schemes supported by MogDB: in-place upgrade and rolling upgrade.
+
+**In-place Upgrade** (recommended): stop the business during the upgrade and upgrade all nodes in the cluster at once. Supports version upgrade with metadata changes and upgrade with plugins. In-place upgrade is the most convenient and commonly used upgrade method, and the process is simple and easy to operate.
+
+**Rolling Upgrade**: Upgrade the nodes in the cluster one by one. The advantage is that a node can always provide services to the outside world to ensure that the business is not interrupted. The disadvantage is that different versions of the database on the primary and standby nodes are running at the same time, the version of the metadata and the version of the log storage file can not have change. Upgrade with plugins is not supported.
+
+Both of the above upgrade schemes need to use PTK for operation. For the installation and upgrade of PTK, please refer to [PTK documentation](https://docs.mogdb.io/en/ptk/v1.1/install).
+
+Please make a good choice of scheme according to the business situation, if you have any questions, please contact Yunhe Enmo engineers to provide support.
\ No newline at end of file
diff --git a/product/en/docs-mogdb/v6.0/upgrade-guide/2-read-before-upgrade.md b/product/en/docs-mogdb/v6.0/upgrade-guide/2-read-before-upgrade.md
new file mode 100644
index 0000000000000000000000000000000000000000..c88cc61690a07d6f0a726e3bf71c27e0573fc569
--- /dev/null
+++ b/product/en/docs-mogdb/v6.0/upgrade-guide/2-read-before-upgrade.md
@@ -0,0 +1,62 @@
+---
+title: Read Before Upgrade
+summary: Read Before Upgrade
+author: 郭欢
+date: 2024-05-17
+---
+
+# Read Before Upgrade
+
+## Upgrade Impact and Constraints
+
+The upgrade includes the following impacts and constraints, before upgrading, you should do a good job of fully checking and understanding, to ensure that the conditions can be met before upgrading, if you have any questions, please contact our engineers.
+
+- Do not perform the upgrade, scale-out, and scale-in at the same time.
+- Virtual IP addresses are not supported.
+- During the upgrade, do not change the values of **wal_level**, **max_connections**, **max_prepared_transactions**, and **max_locks_per_transaction**. If the value is changed, the instance fails to be started after the rollback.
+- You are advised to perform upgrade when the database system is idle. You can determine the time (for example, holidays) based on experience.
+- Before the upgrade, ensure that the database is normal. If your database was installed via PTK, you can run the `ptk cluster -n status` command to query the cluster status, Normal means that all instances of the cluster are available. If your database was installed via gs_om, you can run the `gs_om -t status` command to query the database status. If the value of cluster_state in the query result is Normal, the database is normal.
+- Ensure that the database mutual trust is normal before the upgrade. You can run the **ssh hostname** command on any node to connect to another node for verification. If no password is required for the interconnection between hosts, the mutual trust relationship is normal. (Generally, the mutual trust relationship is normal when the database is running properly.)
+- The database deployment mode (configuration files) cannot be changed before and after the upgrade. Before the upgrade, the deployment mode is verified. If the deployment mode is changed, an error is reported.
+- The database is running properly and data on the primary node has been fully synchronized to standby nodes.
+- Do not enable Kerberos during the upgrade.
+- A cluster that has CM enabled cannot be upgraded, but you can uninstall CM via PTK version 1.4.0 or above, and then upgrade the cluster.
+- The cluster stream replication parameter `enable_stream_replication` needs to be set to `on`.
+
+
+
+## Notes For Each Version
+
+### Current Version 3.0.X
+
+If the current database version is 3.0.X, you need to check for the existence of views that contain rownum and connect by syntax.
+
+You can get the view definition and check if it has a rownum or connect by syntax by using the following command:
+
+```sql
+select pg_get_viewdef('viewname') def where def like '%ROWNUM%' or def like '%CONNECT BY%' ;
+```
+
+If such a view exists, you need to do the following:
+
+1. Get the view definition.
+
+ ```sql
+ Select pg_get_viewdef('v1');
+ ```
+
+ `v1` represents the name of the view where the rownum or connect by syntax exists.
+
+2. Delete the related views.
+
+ ```sql
+ Drop view v1;
+ ```
+
+3. Rebuild these views using the original view definitions after the upgrade is complete.
+
+ ```sql
+ Create view as viewdef;
+ ```
+
+ `viewdef` represents the view definition queried in the first step.
\ No newline at end of file
diff --git a/product/en/docs-mogdb/v6.0/upgrade-guide/3-in-place-upgrade.md b/product/en/docs-mogdb/v6.0/upgrade-guide/3-in-place-upgrade.md
new file mode 100644
index 0000000000000000000000000000000000000000..3daaae972bea3b0ec28c26e6c4bc56cc5da8fcf9
--- /dev/null
+++ b/product/en/docs-mogdb/v6.0/upgrade-guide/3-in-place-upgrade.md
@@ -0,0 +1,130 @@
+---
+title: In-place Upgrade
+summary: In-place Upgrade
+author: 郭欢 候宗田 姚前
+date: 2024-05-30
+---
+
+# In-place Upgrade
+
+In-place upgrade means upgrading all nodes in the cluster at once and stopping the business during the upgrade.
+
+The most convenient and commonly used upgrade method is to use MogDB deployment and operation maintenance tool PTK. The process is simple and easy to operate, just put the new version of the package in the specified directory, and then execute the corresponding PTK commands, PTK will automatically complete all the checks (including the system, disk, and database status, etc.), perform backup operations, and then carry out upgrades or rollbacks.
+
+## Supported Upgrade Version
+
+to be updated
+
+## Backup Data
+
+In the upgrade process, to avoid the implementation of errors in the upgrade exception, resulting in the original version of the database files or data being accidentally modified, and can not be performed to roll back the operation of the situation, the upgrade must be done before the data backup and integrity protection, to facilitate the use of the upgraded data backed up when the upgrade error occurs restored to the state before the upgrade, to avoid operational errors resulting in the business can not be recovered.
+
+**In the process of upgrading with PTK, the tool will automatically complete the backup of the original version of the database software**, If you need to back up all the data files, you can use [gs_basebackup](../reference-guide/tool-reference/tools-used-in-the-internal-system/gs_basebackup.md) for the base physical backup, an example is as follows:
+
+1. Create a backup directory using the database user (e.g. omm)
+
+ ```shell
+ mkdir /home/omm/mogdb_data_bak
+ ```
+
+2. Backup via gs_basebackup
+
+ ```shell
+ gs_basebackup -D /home/omm/mogdb_data_bak -h 127.0.0.1 -p 26000
+ ```
+
+ The host name and port number need to be replaced according to the actual situation.
+
+## Upgrade Steps
+
+Before upgrading the database cluster, you need to check if the plug-in has been created for the current database cluster with the following command:
+
+```shell
+ptk cluster -n list-plugins
+```
+
+After execution, two tables will be output, the first table represents the list of installed plugins, installed does not mean used in the database.
+
+The second table represents the specific plugins that have been created in each database, if no plugins have been created, the Extension(s) field will be empty.
+
+We need to make sure that there is a value under the Extension(s) field in the second table, the upgrade command is different in different cases.
+
+### No Plugin Created
+
+If no plug-ins have been created in the database prior to the upgrade, you can directly specify the new version of the installation package for the upgrade:
+
+```shell
+ptk cluster -n upgrade [-y] -p
+```
+
+### Plugin Created
+
+If a plugin is used in the database, it may cause the plugin to be unavailable after the upgrade or the upgrade to fail because the database metadata will change after the upgrade.
+
+- `--plugin-dir`: The local directory, which holds the pre-downloaded new version of the plugin package (! Please do not change the file name of the downloaded plugin package)
+
+The upgrade command is as follows:
+
+```shell
+ptk cluster -n upgrade [-y] -p --plugin-dir
+```
+
+>  Note: The plug-in version must match with the database version. If a plugin is included, when the database is upgraded, the plugin must be upgraded as well.
+
+## Upgrade Commit
+
+After executing the above commands, PTK will complete the complete operation of the upgrade. After the upgrade, the cluster runs with the new version, at this time, you can verify the operation of the database. When you check the cluster status is normal after the upgrade, you can submit the upgrade by using the following commands to enable the cluster read/write features and delete the backup files of the old version. Note that the cluster cannot be rolled back after the commit, so please make sure it is correct before committing.
+
+```shell
+ptk cluster -n upgrade-commit
+```
+
+After commit, you can check the cluster status with the following command:
+
+```shell
+ptk cluster -n status
+```
+
+## Upgrade Rollback & Data Recovery
+
+If there is an error interruption during the upgrade process, you can solve the problem by human intervention. When the problem is solved, you can continue to complete the upgrade by re-executing the upgrade command.
+
+If you find a problem after upgrading, you can roll back the cluster by using the upgrade-rollback command, and PTK will roll back the cluster to the old version of the state.
+
+```shell
+ptk cluster -n upgrade-rollback
+```
+
+If an exception occurs during the upgrade process and you need to restore from backup data, you can perform the following operations:
+
+1. Stop the database
+
+ ```shell
+ gs_ctl stop -D $PGDATA
+ ```
+
+2. Clean up all or part of the data files in the original database
+
+ ```shell
+ rm -rf $PGDATA/*
+ ```
+
+3. Restore the required database files from a backup as database system user
+
+ ```shell
+ cp -r /home/omm/mogdb_data_bak/* $PGDATA/
+ ```
+
+4. If there is a linked file in the database, it needs to be modified so that it links to the correct file
+
+5. Restart the database server and check the database contents to ensure that the database has been restored to normal state
+
+ ```shell
+ gs_ctl start -D $PGDATA
+ ```
+
+## Notes
+
+If you find that the above upgrade operation does not work as expected, for example, the status information is abnormal when displaying the cluster status, you need to contact our engineers to solve the problem.
+
+Please verify that all database statuses are correct after the upgrade before performing the upgrade commit operation. If the statuses are incorrect, you need to roll back the operation to ensure that the database is restored to the correct status before the upgrade, and then contact our engineers to confirm the problems encountered during the upgrade.
\ No newline at end of file
diff --git a/product/en/docs-mogdb/v6.0/upgrade-guide/4-rolling-upgrade.md b/product/en/docs-mogdb/v6.0/upgrade-guide/4-rolling-upgrade.md
new file mode 100644
index 0000000000000000000000000000000000000000..3634fd4e2e7d8575b5da4683103191785669da96
--- /dev/null
+++ b/product/en/docs-mogdb/v6.0/upgrade-guide/4-rolling-upgrade.md
@@ -0,0 +1,114 @@
+---
+title: Rolling Upgrade
+summary: Rolling Upgrade
+author: 郭欢 候宗田 姚前
+date: 2024-05-17
+---
+
+# Rolling Upgrade
+
+Rolling upgrade does not require all nodes to be down, but can be realized while external services are being upgraded.
+
+PTK 1.4.0 and above support rolling upgrade, but since the rolling upgrade process always upgrades the standby node and does not directly upgrade the primary node, you cannot submit any SQL during the upgrade process, and cannot upgrade database with plugins.
+
+## Supported Upgrade Version
+
+Rolling upgrades only support upgrades between versions with no changes in metadata, i.e., the kernel version of the database must be the same before and after the upgrade. The output of `Number` field by running `ptk candidate db` is the kernel version number (requires PTK 1.4.0 or later).
+
+```sql
+# ptk candidate db
+ Software | Version | Number | Lifecycle Policy | Release Date
+------------+---------+--------+------------------+---------------
+ MogDB | 2.0.0 | 92.298 | LTS | 2021-05-25
+ | 2.0.1 | 92.299 | LTS | 2021-07-08
+ | 2.0.3 | 92.300 | LTS | 2022-06-29
+ | 2.0.4 | 92.302 | LTS | 2022-10-15
+ | 2.1.1 | 92.421 | Preview | 2022-03-22
+ | 3.0.0 | 92.605 | LTS | 2022-06-30
+ | 3.0.1 | 92.605 | LTS | 2022-07-30
+ | 3.0.2 | 92.605 | LTS | 2022-09-16
+ | 3.0.3 | 92.605 | LTS | 2022-10-31
+ | 3.0.4 | 92.605 | LTS | 2023-03-24
+ | 3.0.5 | 92.607 | LTS | 2023-07-20
+ | 3.0.6 | 92.607 | LTS | 2023-09-15
+ | 3.0.7 | 92.607 | LTS | 2023-12-29
+ | 3.1.0 | 92.781 | Preview | 2022-12-30
+ | 3.1.1 | 92.781 | LTS | 2023-11-26
+ | 5.0.0 | 92.848 | LTS | 2023-07-14
+ | 5.0.1 | 92.850 | LTS | 2023-08-15
+ | 5.0.2 | 92.900 | LTS | 2023-09-30
+ | 5.0.3 | 92.900 | LTS | 2023-10-27
+ | 5.0.4 | 92.901 | LTS | 2023-11-30
+ | 5.0.5 | 92.901 | LTS | 2023-12-30
+ | 5.0.6 | 92.920 | LTS | 2024-03-30
+```
+
+## Backup Data
+
+In the upgrade process, to avoid the implementation of errors in the upgrade exception, resulting in the original version of the database files or data being accidentally modified, and can not be performed to roll back the operation of the situation, the upgrade must be done before the data backup and integrity protection, to facilitate the use of the upgraded data backed up when the upgrade error occurs restored to the state before the upgrade, to avoid operational errors resulting in the business can not be recovered.
+
+**In the process of upgrading with PTK, the tool will automatically complete the backup of the original version of the database software**, If you need to back up all the data files, you can use [gs_basebackup](../reference-guide/tool-reference/tools-used-in-the-internal-system/gs_basebackup.md) for the base physical backup, an example is as follows:
+
+1. Create a backup directory using the database user (e.g. omm)
+
+ ```shell
+ mkdir /home/omm/mogdb_data_bak
+ ```
+
+2. Backup via gs_basebackup
+
+ ```shell
+ gs_basebackup -D /home/omm/mogdb_data_bak -h 127.0.0.1 -p 26000
+ ```
+
+ The host name and port number need to be replaced according to the actual situation.
+
+## Upgrade Steps
+
+Take one primary and one standby as an example, assume that the primary IP is `IP1` and the standby IP is `IP2` in the initial state.
+
+1. Check if the machine status is `Normal`.
+
+ ```shell
+ ptk cluster -n status
+ ```
+
+2. Upgrade standby node in the cluster.
+
+ Perform a single-node upgrade of a standby node in the cluster with the `-H` parameter, and the node should be able to temporarily switchover to the primary node to provide services.
+
+ ```shell
+ ptk cluster -n upgrade -p -H
+ ```
+
+3. Perform primary/standby nodes switchover.
+
+ Switch the upgraded standby node to the primary node and demote the original primary node to the standby node.
+
+ ```shell
+ ptk cluster -n switchover -H
+ ```
+
+4. Upgrade the original primary node.
+
+ ```shell
+ ptk cluster -n upgrade -p -H
+ ```
+
+5. (Optional) Re-switch the primary node to the original primary machine.
+
+ ```shell
+ ptk cluster -n switchover -H
+ ```
+
+6. Upgrade commit.
+
+ ```shell
+ ptk cluster -n upgrade-commit
+ ```
+
+## Notes
+
+There will be scenarios where different versions of the primary and standby nodes are running at the same time, so you should make sure that there are no changes in metadata and log file formats between the old and new versions when using a rolling upgrade.
+
+Please make a good data backup in advance, so that you can roll back to the pre-upgrade state if you encounter problems, and then feedback the problems encountered to our engineers.
\ No newline at end of file
diff --git a/product/en/docs-mogdb/v6.0/upgrade-guide/upgrade-guide.md b/product/en/docs-mogdb/v6.0/upgrade-guide/upgrade-guide.md
new file mode 100644
index 0000000000000000000000000000000000000000..be8fcbd4a36d28f80d4d775d9701523aff99f731
--- /dev/null
+++ b/product/en/docs-mogdb/v6.0/upgrade-guide/upgrade-guide.md
@@ -0,0 +1,13 @@
+---
+title: Upgrade Guide
+summary: Upgrade Guide
+author: guo huan
+date: 2024-05-17
+---
+
+# Upgrade Guide
+
+- **[Upgrade Overview](./1-upgrade-overview.md)**
+- **[Read Before Upgrade](./2-read-before-upgrade.md)**
+- **[In-place Upgrade](./3-in-place-upgrade.md)**
+- **[Rolling Upgrade](./4-rolling-upgrade.md)**
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v5.0/_index.md b/product/zh/docs-mogdb/v5.0/_index.md
index aa31e410266d80984fc36fbc041ef70d50818715..b480405c504af2911cf2b72e3fd32f390a31706b 100644
--- a/product/zh/docs-mogdb/v5.0/_index.md
+++ b/product/zh/docs-mogdb/v5.0/_index.md
@@ -47,7 +47,7 @@ date: 2022-08-07
[备份与恢复](./administrator-guide/backup-and-restoration/backup-and-restoration.md)
-[升级指南](./administrator-guide/upgrade-guide.md)
+[升级指南](./upgrade-guide/upgrade-guide.md)
[故障诊断指南](./common-faults-and-identification/common-fault-locating-methods.md)
diff --git a/product/zh/docs-mogdb/v5.0/about-mogdb/mogdb-new-feature/5.0.4.md b/product/zh/docs-mogdb/v5.0/about-mogdb/mogdb-new-feature/5.0.4.md
index f3eff920a7718b60ea6d446aa24a983f1f639e9a..acdcbee400acebaa6b6c911b13b244af87efb5e3 100644
--- a/product/zh/docs-mogdb/v5.0/about-mogdb/mogdb-new-feature/5.0.4.md
+++ b/product/zh/docs-mogdb/v5.0/about-mogdb/mogdb-new-feature/5.0.4.md
@@ -17,7 +17,7 @@ MogDB 5.0.4是MogDB 5.0.0的补丁版本,于2023年11月30日发布,其在Mo
1. [支持了pivot和unpivot语法](../../characteristic-description/compatibility/pivot-and-unpivot.md)
-2. A兼容模式支持使用like模糊匹配条件进行btree索引扫描
+2. [A兼容模式支持使用like模糊匹配条件进行btree索引扫描](../../characteristic-description/enterprise-level-features/index-support-fuzzy-matching.md)
diff --git a/product/zh/docs-mogdb/v5.0/about-mogdb/mogdb-new-feature/5.0.6.md b/product/zh/docs-mogdb/v5.0/about-mogdb/mogdb-new-feature/5.0.6.md
index 51941745edbcbd41d417688d1572a9351f791356..80c595f7dfa2c3512db88557bb5bd3cc9e82ab2c 100644
--- a/product/zh/docs-mogdb/v5.0/about-mogdb/mogdb-new-feature/5.0.6.md
+++ b/product/zh/docs-mogdb/v5.0/about-mogdb/mogdb-new-feature/5.0.6.md
@@ -168,6 +168,6 @@ MogDB对读写请求的处理全部放在事务机制下,这与Oracle读不启
33. 【3283】修复了修改most_available_sync参数且执行reload命令之后,参数无法立即生效的问题
34. 【3167】修复使用select ... for share语法时,有几率会导致查询时出现找不到CSN文件的问题
-## 4. 升级指南
+## 4. 注意事项
-查看最新版本的[升级指南](../../administrator-guide/upgrade-guide.md),或点此下载[适用于MogDB V5.0.6的升级指南](https://cdn-mogdb.enmotech.com/mogdb-media/5.0.6/MogDBV5.0.6升级指南.docx)。
\ No newline at end of file
+如果您需要将当前低版本MogDB升级至5.0.6版本,请务必查看[升级前必读](../../upgrade-guide/2-read-before-upgrade.md#目标版本为506),关于数据库升级的详细介绍请查看最新版本的[升级指南](../../upgrade-guide/upgrade-guide.md)。
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v5.0/administrator-guide/administrator-guide.md b/product/zh/docs-mogdb/v5.0/administrator-guide/administrator-guide.md
index a957510edb5685effc686d520e27e07773d43ddf..9f1d5bc0b4dc6b7690ad045a2252948a58599f4f 100644
--- a/product/zh/docs-mogdb/v5.0/administrator-guide/administrator-guide.md
+++ b/product/zh/docs-mogdb/v5.0/administrator-guide/administrator-guide.md
@@ -14,5 +14,4 @@ date: 2023-05-22
- **[列存表管理](column-store-tables-management.md)**
- **[备份与恢复](backup-and-restoration/backup-and-restoration.md)**
- **[数据库部署方案](database-deployment-scenario/database-deployment-scenario.md)**
-- **[数据导出导入](importing-and-exporting-data/importing-and-exporting-data.md)**
-- **[升级指南](upgrade-guide.md)**
\ No newline at end of file
+- **[数据导出导入](importing-and-exporting-data/importing-and-exporting-data.md)**
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v5.0/administrator-guide/upgrade-guide.md b/product/zh/docs-mogdb/v5.0/administrator-guide/upgrade-guide.md
deleted file mode 100644
index 9f358d4aad46c77a988d20d52692f10eafa4a9d9..0000000000000000000000000000000000000000
--- a/product/zh/docs-mogdb/v5.0/administrator-guide/upgrade-guide.md
+++ /dev/null
@@ -1,488 +0,0 @@
----
-title: 升级指南
-summary: 升级指南
-author: 郭欢 候宗田
-date: 2024-03-26
----
-
-# 升级指南
-
-## 升级概述
-
-当数据库发布的新的版本,用户根据发布信息决定使用新版本数据库时,需要做升级操作。集群升级是指在现有集群的基础上,无需导出数据的情况下,直接将数据库二进制文件及元数据升级到更高的版本。
-
-本文档主要适用于升级操作人员。操作人员必须具备以下经验和技能:
-
-- 熟悉当前网络的组网和相关网元的版本信息。
-
-- 有该设备维护经验,熟悉设备的操作维护方式。
-
-
-
-## 升级方案
-
-MogDB支持的升级方式有三种:就地升级、临时升级和灰度升级。升级策略需要考虑版本间是否发生元数据变更。当元数据的版本不发生变化时可以使用临时升级和灰度升级(如V5.0.0升级至V5.0.1),发生变化时只能通过PTK升级(如V3.0.0升级至V5.0.0)。
-
-**就地升级**(推荐):使用MogDB配套的部署运维工具PTK升级,是最方便常用的升级方式,升级过程简单易操作,只需将新版压缩包放在指定目录,然后执行对应的PTK命令,PTK就会自动完成所有检查(包括系统、磁盘、数据库状态等)、执行备份操作,然后进行升级或回滚。
-
->  说明:MogDB V5.0.6支持通过PTK对**V3.0.0-V3.0.7**和**V5.0.0-V5.0.5**版本的数据库进行集群升级,用户操作简单,使用场景限制最小。
-
-**临时升级**:当用户遇到严重问题时,研发工程师定位该问题并进行修复,发出新的补丁版本进行替换,将采用临时升级。该升级方式只进行二进制文件替换,不需要额外操作,主要用于替换版本和原版本之间代码更新非常少的场景。该升级方式的优点是轻量化、操作灵活。缺点在于使用场景仅限问题修复,版本之间不能有任何的元数据或者存储文件格式变更。临时升级仅支持小版本升级,升级操作需要停止业务进行,一次性升级所有节点。
-
-**灰度升级**:该升级方式面向集群模式,对于集群中的节点逐个进行升级。优点在于始终有节点能够对外提供服务,保证业务不中断。缺点在于主备节点上不同版本数据库同时运行,元数据的版本和日志存储文件的版本都不能有任何变更。灰度升级仅支持元数据无变更的版本之间升级。
-
-请根据业务情况做好方案选择,如有疑问请联系云和恩墨工程师提供支持。
-
-
-
-## 升级影响和约束
-
-升级包含以下影响和约束,在升级前应该做好充分检查和了解,确保条件都能满足的情况下再进行升级,如果有任何疑问需联系原厂工程师。
-
-- 升级操作不能和扩容、缩容同时执行。
-- 不支持虚拟IP。
-- 升级过程中,不允许对wal_level,max_connections,max_prepared_transactions,max_locks_per_transaction这四个GUC参数的值进行修改。如果修改,会导致回滚后实例启动异常。
-- 建议在数据库系统空闲情况下进行升级,尽量避开业务繁忙的时间段(可按照经验判断,如节假日等)。
-- 升级前尽可能保证数据库状态正常。通过PTK安装的版本可通过`ptk cluster -n status`命令查看集群状态,Normal代表集群所有实例正常可用。通过OM安装的版本可以通过`gs_om -t status`查询,查询结果的cluster_state为Normal代表数据库正常可用。
-- 升级前保证数据库互信正常,可以在任意节点上,通过`ssh hostname`命令,连接另外一个节点进行验证。如果各机器间互连不用输入密码,说明互信正常(通常数据库状态正常时,互信一般都是正常的)。
-- 升级前后,数据库的部署方式(配置文件)不能发生变化。升级前PTK会对部署方式进行校验,如果改变会报错。
-- 数据库运行正常且主DN的数据完全同步到备DN。
-- 升级过程中不允许打开kerberos开关。
-
->  **注意**:
->
-> 如果原数据库版本为3.0.X,需要额外检查是否存在包含rownum和connect by语法的视图。
->
-> 可以通过如下语句来获取视图定义,检查其是否存在rownum或者connect by语法:
->
-> ```sql
-> select pg_get_viewdef('viewname') def where def like '%ROWNUM%' or def like '%CONNECT BY%' ;
-> ```
->
-> 如果存在这样的视图,需执行以下操作:
->
-> 1. 获取视图定义
->
-> ```sql
-> Select pg_get_viewdef('v1');
-> ```
->
-> v1代表存在rownum或者connectby语法的视图名称。
->
-> 2. 删除相关视图
->
-> ```sql
-> Drop view v1;
-> ```
->
-> 3. 升级完成后使用原视图定义重建这些视图
->
-> ```sql
-> Create view as viewdef;
-> ```
->
-> viewdef代表第一步中获取的视图定义。
-
-
-
-## 就地升级
-
-### 安装升级PTK
-
-PTK作为一个部署管理工具,并不需要和数据库实例安装到一起。我们推荐使用一个中控管理机器来安装PTK,然后通过该中控机去部署管理数据库实例到其他服务器,这样的话,可以避免数据库实例机器的故障造成PTK不可用。
-
-**在线安装**
-
-> 注意:命令行安装方式不支持 Windows 系统
-
-在 MacOS 或 Linux 系统的终端中,执行以下指令即可自动完成安装:
-
-```bash
-curl --proto '=https' --tlsv1.2 -sSf https://cdn-mogdb.enmotech.com/ptk/install.sh | sh
-```
-
-该指令会自动将 PTK 安装在用户的家目录 `$HOME/.ptk` 目录下,该目录以后会作为 PTK 工具的工作目录,
-其产生的缓存文件、数据文件以及集群的配置信息,备份信息等文件均会存储到该目录下。
-同时,安装指令会自动将 `$HOME/.ptk/bin` 的路径加入到对应 SHELL Profile 文件的 PATH 环境变量中,
-这样在用户登录到服务器后就可以直接使用 `ptk` 指令了。
-
-**离线安装**
-
-如果你需要安装的服务器无法直接访问外网或者是需要在 Windows 系统上使用 PTK 工具,此时可以通过手动方式进行安装。
-
-请按照以下操作步骤进行安装:
-
-第一步:先在个人电脑上下载你所要安装的机器的对应安装包,以下是不同系统架构的最新版的安装包:
-
-| 文件 | 操作系统 | 架构 |
-| :----------------------------------------------------------- | -------- | ------ |
-| [ptk_darwin_arm64.tar.gz](https://cdn-mogdb.enmotech.com/ptk/latest/ptk_darwin_arm64.tar.gz) | Darwin | arm64 |
-| [ptk_darwin_x86_64.tar.gz](https://cdn-mogdb.enmotech.com/ptk/latest/ptk_darwin_x86_64.tar.gz) | Darwin | x86_64 |
-| [ptk_linux_arm64.tar.gz](https://cdn-mogdb.enmotech.com/ptk/latest/ptk_linux_arm64.tar.gz) | Linux | arm64 |
-| [ptk_linux_x86_64.tar.gz](https://cdn-mogdb.enmotech.com/ptk/latest/ptk_linux_x86_64.tar.gz) | Linux | x86_64 |
-| [ptk_windows_x86_64.tar.gz](https://cdn-mogdb.enmotech.com/ptk/latest/ptk_windows_x86_64.tar.gz) | Windows | x86_64 |
-
-第二步:下载好安装包以后,通过内网将安装包发送到目标服务器上解压;
-
-第三步:解压后会得到一个名为 `ptk` 的二进制文件,该文件即为 PTK 的可执行文件,可以根据个人偏好,将该文件移动到合适的目录(推荐 `$HOME/.ptk/bin/` 目录,需手动创建),然后将所在所在目录添加到 PATH 环境变量中即可;
-
-**升级PTK**
-
-如果是离线方式安装的,重新下载最新的安装包后替换覆盖服务器上的二进制文件即可升级到最新版。
-
-如果是在线方式安装的,执行以下指令即可自动将 PTK 升级到最新版:
-
-```bash
-ptk self upgrade
-```
-
-### 备份数据
-
-在升级过程中,为避免执行错误出现升级异常,导致原版本数据库文件或数据被意外修改,而无法执行回滚操作的情况,升级前须做好数据备份和完整性保护,方便在升级发生错误时使用已备份的数据恢复到升级前状态,避免因操作失误导致业务无法恢复的情况出现。
-
-在使用PTK升级过程中,工具会自动完成原版本数据库软件的备份,如果需要备份全部的数据文件,可以使用gs_basebackup进行基础的物理备份,示例如下:
-
-1. 使用数据库用户(如omm)创建备份目录
-
- ```shell
- mkdir /home/omm/mogdb_data_bak
- ```
-
-2. 通过gs_basebackup进行备份
-
- ```shell
- gs_basebackup -D /home/omm/mogdb_data_bak -h 127.0.0.1 -p 26000
- ```
-
- 需根据实际情况替换主机名、端口号。
-
-### 集群升级
-
-#### 升级前检查
-
-我们需要先通过以下命令来确认当前数据库集群是否有创建过插件:
-
-```shell
-ptk cluster -n list-plugins
-```
-
-执行后会输出两个表格,第一个表格代表安装过的插件列表,安装过并不意味着数据库里使用了。第二个表格代表具体的每个数据库中创建过的插件,如果没有创建过任何插件,Extension(s)字段会为空。我们需要确认第二个表格中Extension(s)字段下是否有值,不同的情况升级的方式有些许差别。
-
-#### 未创建插件的集群升级
-
-如果升级前的数据库内没有创建过任何插件,可以直接指定新版本的安装包进行升级:
-
-```shell
-ptk cluster -n upgrade [-y] -p
-```
-
-#### 含有插件的集群升级
-
-如果数据库中使用了插件的话,由于升级后数据库元数据会发生改变,可能会导致升级后插件不可用或者升级失败。所以对于使用了插件的集群,需要额外指定以下参数来升级:
-
---plugin-dir: 本地目录,该目录下存放提前下载的新版本插件包(下载的插件包请勿变更文件名)
-
-升级命令如下:
-
-```shell
-ptk cluster -n upgrade [-y] -p --plugin-dir
-```
-
->  注意:插件版本必须和数据库版本进行匹配,如果包含插件,在数据库升级时必须对插件也进行升级。
-
-#### 升级提交
-
-执行上述命令后,PTK会完成升级的完整操作,升级后集群以新版本运行,此时您可以在数据库上进行验证操作,当升级后检查集群状态为正常的情况下,可以通过以下命令提交升级,开启集群读写状态,删除旧版本的备份文件。注意,提交后集群无法再回滚,请确认正确后再提交。
-
-```shell
-ptk cluster -n upgrade-commit
-```
-
-确认提交升级后,可以通过以下命令查看集群状态:
-
-```shell
-ptk cluster -n status
-```
-
->  注意:
->
-> MogDB 5.0.6新增并行导入导出功能(详见[逻辑备份恢复效率增强](../characteristic-description/high-availability/enhanced-efficiency-of-logical-backup-and-restore.md)),该功能依赖于新增内置插件tidrangescan。升级完成后,如需使用gs_dump、gs_restore并行导入导出功能,需在要进行导入导出的库里手动创建tidrangescan插件:
->
-> ```sql
-> create extension tidrangescan;
-> ```
-
-#### 升级回滚和数据恢复
-
-如果升级过程中存在报错中断,您可以通过人为介入来解决,当解决了问题后,可以通过重新执行升级指令继续完成升级。
-
-如果升级后验证发现问题可以通过upgrade-rollback命令进行回滚,PTK会将集群回滚为旧版本的状态。
-
-```shell
-ptk cluster -n upgrade-rollback
-```
-
-如果升级过程发生异常,需要从备份数据进行恢复,可执行以下操作:
-
-1. 停止数据库服务器
-
- ```shell
- gs_ctl stop -D $PGDATA
- ```
-
-2. 清理原库中的所有或部分数据文件
-
- ```shell
- rm -rf $PGDATA/*
- ```
-
-3. 使用数据库系统用户权限从备份中还原需要的数据库文件
-
- ```shell
- cp -r /home/omm/mogdb_data_bak/* $PGDATA/
- ```
-
-4. 若数据库中存在链接文件,需要修改使其链接到正确的文件
-
-5. 重启数据库服务器,并检查数据库内容,确保数据库已经恢复到所需的状态
-
- ```shell
- gs_ctl start -D $PGDATA
- ```
-
-### 注意事项
-
-在执行以上升级操作的过程中,如果发现未能按照预期正常进行,例如展示集群状态时,状态信息为异常等,需要联系原厂工程师进行解决。
-
-请在升级后所有数据库状态都验证正确以后,再执行升级提交操作,如果状态不正确,需进行回滚操作,确保数据库恢复到升级前的正确状态,然后联系原厂工程师对升级中遇到的问题进行确认。
-
-
-
-## 临时升级
-
-### 升级前检查
-
-升级前需要检查的所有内容在[升级影响和约束](#升级影响和约束)章节已经列出。请在对所有内容进行充分检查和了解后再进行升级操作。在升级过程中如遇到任何问题,请及时联系原厂工程师进行处理。
-
-### 备份数据
-
-在升级过程中,为避免执行错误出现升级异常,导致原版本数据库文件或数据被意外修改,而无法执行回滚操作的情况,升级前须做好数据备份和完整性保护,方便在升级发生错误时使用已备份的数据恢复到升级前状态,避免因操作失误导致业务无法恢复的情况出现。
-
-采用临时升级方式时,在升级前,请务必手动完成备份,具体操作示例如下:
-
-1. 备份原版本可执行文件
-
- ```shell
- mkdir -p /home/omm/mogdb_app_bak
- cp -r $GAUSSHOME/* /home/omm/mogdb_app_bak/*
- ```
-
-2. 备份用户数据
-
- ```shell
- mkdir /home/omm/mogdb_data_bak
- gs_basebackup -D /home/omm/mogdb_data_bak -h 127.0.0.1 -p 26000
- ```
-
- 需根据实际情况替换主机名、端口号。
-
-### 升级步骤
-
-临时升级的具体操作步骤如下:
-
-1. 关停数据库
-
- ```shell
- gs_ctl stop -D $PGDATA
- ```
-
-2. 解压目标版本安装包,如:
-
- ```shell
- tar -xvf MogDB-5.0.6-Kylin-x86_64-all.tar.gz
- ```
-
-3. 进入解压后的目录
-
- ```shell
- cd MogDB-5.0.6-Kylin-x86_64-all/
- ```
-
-4. 解压内核包,覆盖原始的app文件夹
-
- ```shell
- tar -xvf MogDB-5.0.6-Kylin-64bit.tar.gz -C $GAUSSHOME --strip-components=1
- ```
-
-5. 启动数据库进行功能验证
-
- ```shell
- gs_ctl start -D $PGDATA
- ```
-
->  注意:
->
-> MogDB 5.0.6新增并行导入导出功能(详见[逻辑备份恢复效率增强](../characteristic-description/high-availability/enhanced-efficiency-of-logical-backup-and-restore.md)),该功能依赖于新增内置插件tidrangescan。升级完成后,如需使用gs_dump、gs_restore并行导入导出功能,需在要进行导入导出的库里手动创建tidrangescan插件:
->
-> ```sql
-> create extension tidrangescan;
-> ```
-
-### 升级回滚
-
-使用临时升级操作无需进行额外的提交动作,如果启动后检查发现有异常,可通过原有的备份文件恢复到升级前状态。
-
-```shell
-cp -r /home/omm/mogdb_app_bak/* $GAUSSHOME/*
-rm -r $PGDATA
-mv /home/omm/mogdb_data_bak $PGDATA
-```
-
-### 注意事项
-
-在执行以上升级操作的过程中,如果发现未能按照预期正常进行,例如替换新版本后,数据库启动异常等,需要联系原厂工程师进行解决。
-
-请确保在升级之前进行原数据库文件的备份,在升级过程中如果遇到任何问题,先通过备份进行恢复,然后联系原厂工程师提供支持。
-
-
-
-## 灰度升级
-
-灰度升级不同于前面的升级方式,不需要将所有节点全部停机,升级后重新启动,而是可以实现对外服务的同时进行升级操作。
-
-### 升级前检查
-
-请在对以下所有内容进行充分检查和了解后再进行升级操作。在升级过程中如遇到任何问题,及时联系原厂工程师进行处理。
-
-1. 收集节点信息
-
- 联系数据库系统管理员,获取数据库涉及节点的节点名称、节点IP地址。节点的root、omm用户密码等环境信息,设置root用户远程登录。
-
-2. 备份数据
-
- 升级一旦失败,有可能会影响到业务的正常开展。提前备份数据,就可以在风险发生后,尽快的恢复业务。
-
-3. 获取升级包
-
- 访问[MogDB官网下载页面](https://www.mogdb.io/downloads/mogdb)获取想要升级的升级包。
-
-4. 检查数据库节点磁盘使用率
-
- 建议数据库节点磁盘使用率低于80%时再执行升级操作。
-
-> 注意事项:
->
-> - 在灰度升级方式中,升级版本之间一定不能有元数据的变动,需确保满足该条件,才可进行灰度升级。
-> - 灰度升级必须是对包含主备的集群进行升级。
-
-### 备份数据
-
-在升级过程中,为避免执行错误出现升级异常,导致原版本数据库文件或数据被意外修改,而无法执行回滚操作的情况,升级前须做好数据备份和完整性保护,方便在升级发生错误时使用已备份的数据恢复到升级前状态,避免因操作失误导致业务无法恢复的情况出现。
-
-采用灰度升级方式时,在升级前,请务必手动完成备份,具体操作示例如下:
-
-1. 备份原版本可执行文件
-
- ```shell
- mkdir -p /home/omm/mogdb_app_bak
- cp -r $GAUSSHOME/* /home/omm/mogdb_app_bak/*
- ```
-
-2. 备份用户数据
-
- ```shell
- mkdir /home/omm/mogdb_data_bak
- gs_basebackup -D /home/omm/mogdb_data_bak -h 127.0.0.1 -p 26000
- ```
-
- 需根据实际情况替换主机名、端口号。
-
-### 升级步骤
-
-灰度升级的具体操作步骤如下:
-
-1. 关闭备机
-
- ```shell
- gs_ctl stop -D $PGDATA
- ```
-
-2. 升级备机,解压新版本的压缩包覆盖备机的app文件夹,例如:
-
- ```shell
- tar -xvf MogDB-5.0.6-Kylin-x86_64-all.tar.gz
- cd MogDB-5.0.6-Kylin-x86_64-all
- tar -xvf MogDB-5.0.6-Kylin-64bit.tar.gz -C $GAUSSHOME --strip-components=1
- ```
-
-3. 启动备机
-
- ```shell
- gs_ctl start -D $PGDATA -M standby
- ```
-
-4. 在备机上执行以下命令,进行主备机器切换
-
- ```shell
- gs_ctl switchover -D $PGDATA
- ```
-
-5. 关闭原主机
-
- ```shell
- gs_ctl stop -D $PGDATA
- ```
-
-6. 升级原主机,解压新版本的压缩包覆盖备机的app文件夹,例如:
-
- ```shell
- tar -xvf MogDB-5.0.6-Kylin-x86_64-all.tar.gz
- cd MogDB-5.0.6-Kylin-x86_64-all
- tar -xvf MogDB-5.0.6-Kylin-64bit.tar.gz -C $GAUSSHOME --strip-components=1
- ```
-
-7. 以备机模式启动原主机
-
- ```shell
- gs_ctl start -D $PGDATA -M standby
- ```
-
-8. 查询集群状态
-
- ```shell
- gs_om -t status --detail
- ```
-
-9. 升级版本查询
-
- ```shell
- mogdb --version
- ```
-
-10. 升级后功能验证
-
- 对新版本包含的bug fix或者功能进行验证
-
->  注意:
->
-> MogDB 5.0.6新增并行导入导出功能(详见[逻辑备份恢复效率增强](../characteristic-description/high-availability/enhanced-efficiency-of-logical-backup-and-restore.md)),该功能依赖于新增内置插件tidrangescan。升级完成后,如需使用gs_dump、gs_restore并行导入导出功能,需在要进行导入导出的库里手动创建tidrangescan插件:
->
-> ```sql
-> create extension tidrangescan;
-> ```
-
-### 升级回滚
-
-使用灰度升级操作无需进行额外的提交动作,如果启动后检查发现有异常,可通过原有的备份文件将主备节点都恢复到升级前状态。
-
-```shell
-cp -r /home/omm/mogdb_app_bak/* $GAUSSHOME/*
-rm -r $PGDATA
-mv /home/omm/mogdb_data_bak $PGDATA
-```
-
-### 注意事项
-
-灰度升级会存在不同版本的主备同时运行的场景,因此在使用灰度升级时应确保新旧版本之间不存在元数据和日志文件格式的变更。
-
-请提前做好数据备份,在遇到问题时可以回退到升级前状态,然后将遇到的问题反馈给原厂工程师。
diff --git a/product/zh/docs-mogdb/v5.0/characteristic-description/characteristic-description-overview.md b/product/zh/docs-mogdb/v5.0/characteristic-description/characteristic-description-overview.md
index 27efbcd0a96af0a279264d8b5cf64a0e48596106..b5a478b484188a05f3471424e31860701dea33f8 100644
--- a/product/zh/docs-mogdb/v5.0/characteristic-description/characteristic-description-overview.md
+++ b/product/zh/docs-mogdb/v5.0/characteristic-description/characteristic-description-overview.md
@@ -55,7 +55,6 @@ MogDB 5.0版本具有以下特性:
+ [逻辑备份恢复效率增强](./high-availability/enhanced-efficiency-of-logical-backup-and-restore.md)
+ 维护性
- + [灰度升级](./maintainability/1-gray-upgrade.md)
+ [支持WDR诊断报告](./maintainability/2-workload-diagnosis-report.md)
+ [慢SQL诊断](./maintainability/3-slow-sql-diagnosis.md)
+ [Session性能诊断](./maintainability/4-session-performance-diagnosis.md)
@@ -64,7 +63,6 @@ MogDB 5.0版本具有以下特性:
+ [插件拆分](./maintainability/extension-splitting.md)
+ [内置stack工具](./maintainability/built-in-stack-tool.md)
+ [支持SQL PATCH](./maintainability/sql-patch.md)
-
+ [轻量级锁导出与分析](./maintainability/light-lock-export-and-analysis.md)
+ [DCF模块追踪](./maintainability/dcf-module-tracing.md)
+ [写入不合法字符报错](./maintainability/error-when-writing-illegal-characters.md)
@@ -150,7 +148,8 @@ MogDB 5.0版本具有以下特性:
+ [游标支持倒序检索](./enterprise-level-features/scroll-cursor.md)
+ [支持裁剪子查询投影列](./enterprise-level-features/support-for-pruning-subquery-projection-columns.md)
+ [排序列裁剪](./enterprise-level-features/pruning-order-by-in-subqueries.md)
-
+ + [自动创建支持模糊匹配的索引](./enterprise-level-features/index-support-fuzzy-matching.md)
+
+ 应用开发接口
+ [支持标准SQL](./application-development-interfaces/1-standard-sql.md)
+ [支持标准开发接口](./application-development-interfaces/2-standard-development-interfaces.md)
diff --git a/product/zh/docs-mogdb/v5.0/characteristic-description/enterprise-level-features/enterprise-level-features.md b/product/zh/docs-mogdb/v5.0/characteristic-description/enterprise-level-features/enterprise-level-features.md
index bbedc5ac19aa44ccfebcb150b848495402f1b66a..c4dafc535f055c8fc0c5c3efe0c28b4f05180db3 100644
--- a/product/zh/docs-mogdb/v5.0/characteristic-description/enterprise-level-features/enterprise-level-features.md
+++ b/product/zh/docs-mogdb/v5.0/characteristic-description/enterprise-level-features/enterprise-level-features.md
@@ -35,4 +35,5 @@ date: 2023-05-22
+ **[事件触发器](event-trigger.md)**
+ **[游标支持倒序检索](scroll-cursor.md)**
+ **[支持裁剪子查询投影列](support-for-pruning-subquery-projection-columns.md)**
-+ **[排序列裁剪](pruning-order-by-in-subqueries.md)**
\ No newline at end of file
++ **[排序列裁剪](pruning-order-by-in-subqueries.md)**
++ **[自动创建支持模糊匹配的索引](index-support-fuzzy-matching.md)**
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v5.0/characteristic-description/enterprise-level-features/index-support-fuzzy-matching.md b/product/zh/docs-mogdb/v5.0/characteristic-description/enterprise-level-features/index-support-fuzzy-matching.md
new file mode 100644
index 0000000000000000000000000000000000000000..b7a4bf14fb160f9d74f4a52e900a6543f177a589
--- /dev/null
+++ b/product/zh/docs-mogdb/v5.0/characteristic-description/enterprise-level-features/index-support-fuzzy-matching.md
@@ -0,0 +1,51 @@
+---
+title: 自动创建支持模糊匹配的索引
+summary: 自动创建支持模糊匹配的索引
+author: 郭欢 刘宗昊
+date: 2024-04-16
+---
+
+# 自动创建支持模糊匹配的索引
+
+## 可获得性
+
+本特性自MogDB 5.0.4版本开始引入。
+
+## 特性简介
+
+A兼容模式下,支持通过GUC参数启用自动创建支持模糊匹配的索引。
+
+## 特性描述
+
+通常在MogDB中想要创建一个支持模糊匹配的索引,需要在创建索引时指定模糊匹配的操作符类(如 `text_pattern_ops`、`varchar_pattern_ops` 或 `bpchar_pattern_ops`)。自MogDB 5.0.4版本开始,允许使用 `behavior_compat_options` 参数中的 `allow_like_indexable` 来控制这些操作符类在索引上的使用。
+
+## 特性约束
+
+`allow_like_indexable` 选项仅用于控制操作符类的使用行为,在实际使用过程中需要注意:
+
+1. 创建索引前设置该参数选项;
+2. 确保模糊匹配操作满足操作符类的使用条件。
+
+## 示例
+
+```sql
+MogDB=# create table t1(a int, b text);
+CREATE TABLE
+MogDB=# insert into t1 values (1, 'foo'), (2, 'bar');
+INSERT 0 2
+MogDB=# set behavior_compat_options='allow_like_indexable';
+SET
+MogDB=# create index on t1(b);
+CREATE INDEX
+MogDB=# explain select /*+ indexscan(t1) */ * from t1 where b like 'fo%';
+ QUERY PLAN
+--------------------------------------------------------------------
+ Index Scan using t1_b_idx on t1 (cost=0.00..8.27 rows=1 width=36)
+ Index Cond: ((b >= 'fo'::text) AND (b < 'fp'::text))
+ Filter: (b ~~ 'fo%'::text)
+(3 rows)
+```
+
+## 相关页面
+
+[behavior_compat_options](../../reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md#behavior_compat_options)
diff --git a/product/zh/docs-mogdb/v5.0/characteristic-description/maintainability/1-gray-upgrade.md b/product/zh/docs-mogdb/v5.0/characteristic-description/maintainability/1-gray-upgrade.md
deleted file mode 100644
index 9edd4cc9a3e4758d51cd8a6b083876409cc64ecd..0000000000000000000000000000000000000000
--- a/product/zh/docs-mogdb/v5.0/characteristic-description/maintainability/1-gray-upgrade.md
+++ /dev/null
@@ -1,40 +0,0 @@
----
-title: 灰度升级
-summary: 灰度升级
-author: Guo Huan
-date: 2022-05-07
----
-
-# 灰度升级
-
-## 可获得性
-
-本特性自MogDB 2.0.0版本开始引入。
-
-## 特性简介
-
-灰度升级支持全业务操作,一次性升级所有节点。
-
-## 客户价值
-
-灰度升级提供了一种在线升级的方式,保证在不中断业务的情况下,对所有的节点进行升级。
-
-## 特性描述
-
-灰度升级是一种支持所有节点升级的在线升级方式。目前灰度升级只涉及数据库二进制的替换,为了尽可能降低对于业务的影响,采用同一节点两套二进制同时存在的方式,使用软连接切换的方式来进行进程版本的切换升级(闪断一次,10秒以内)。
-
-## 特性增强
-
-无。
-
-## 特性约束
-
-灰度升级的约束条件请参见《管理指南》中的[升级指南](../../administrator-guide/upgrade-guide.md)章节。
-
-## 依赖关系
-
-无。
-
-## 相关页面
-
-[升级指南](../../administrator-guide/upgrade-guide.md)
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v5.0/characteristic-description/maintainability/maintainability.md b/product/zh/docs-mogdb/v5.0/characteristic-description/maintainability/maintainability.md
index 9975976595a466e50ba583543bcf240195ba97aa..b138d097bf368ce932513b984ccfb7e9461fcffa 100644
--- a/product/zh/docs-mogdb/v5.0/characteristic-description/maintainability/maintainability.md
+++ b/product/zh/docs-mogdb/v5.0/characteristic-description/maintainability/maintainability.md
@@ -7,7 +7,6 @@ date: 2023-05-22
# 维护性
-+ **[灰度升级](1-gray-upgrade.md)**
+ **[支持WDR诊断报告](2-workload-diagnosis-report.md)**
+ **[慢SQL诊断](3-slow-sql-diagnosis.md)**
+ **[Session性能诊断](4-session-performance-diagnosis.md)**
diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md
index 134ae31d4c71e460d20369e5566c2411c8ad4c64..d7be42c9a6f738cf8e95a240e622039c8ea23157 100644
--- a/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md
+++ b/product/zh/docs-mogdb/v5.0/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md
@@ -450,7 +450,11 @@ date: 2021-04-20
- bpchar_coerce_compat
- 控制bpchar和text运算时隐式转换text为bpchar,使bpchar_col = 'xxx'::text条件可直接运用索引或者分区裁剪,提升查询效率
+ 控制bpchar和text运算时隐式转换text为bpchar,使bpchar_col = 'xxx'::text条件可直接运用索引或者分区裁剪,提升查询效率。
+
+- allow_like_indexable
+
+ 配置此选项会自动创建支持模糊匹配的索引(自5.0.4版本引入)。
## plsql_compile_check_options
diff --git a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/ALTER-SEQUENCE.md b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/ALTER-SEQUENCE.md
index 42e506c1896457f8ebec1f8747cf356f6f720bfb..f7d309ddbbf84c908c54b77674423d2f74095483 100644
--- a/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/ALTER-SEQUENCE.md
+++ b/product/zh/docs-mogdb/v5.0/reference-guide/sql-syntax/ALTER-SEQUENCE.md
@@ -10,7 +10,7 @@ customweight: 1
## 功能描述
-修改一个现有的序列的参数。
+修改一个现有的序列的参数。(**此语法自MogDB 5.0.6开始支持**)
## 注意事项
diff --git a/product/zh/docs-mogdb/v5.0/toc.md b/product/zh/docs-mogdb/v5.0/toc.md
index 341f143683e8c0aeab084a81a22c4747548f8388..b54c3e32a2e558f9b9de342b805b6f306a546c3a 100644
--- a/product/zh/docs-mogdb/v5.0/toc.md
+++ b/product/zh/docs-mogdb/v5.0/toc.md
@@ -96,7 +96,6 @@
+ [MogDB/CM/PTK支持双网段](/characteristic-description/high-availability/cm-dual-network-segment-deployment.md)
+ [逻辑备份恢复效率增强](/characteristic-description/high-availability/enhanced-efficiency-of-logical-backup-and-restore.md)
+ [维护性](/characteristic-description/maintainability/maintainability.md)
- + [灰度升级](/characteristic-description/maintainability/1-gray-upgrade.md)
+ [支持WDR诊断报告](/characteristic-description/maintainability/2-workload-diagnosis-report.md)
+ [慢SQL诊断](/characteristic-description/maintainability/3-slow-sql-diagnosis.md)
+ [Session性能诊断](/characteristic-description/maintainability/4-session-performance-diagnosis.md)
@@ -187,6 +186,7 @@
+ [游标支持倒序检索](/characteristic-description/enterprise-level-features/scroll-cursor.md)
+ [支持裁剪子查询投影列](/characteristic-description/enterprise-level-features/support-for-pruning-subquery-projection-columns.md)
+ [排序列裁剪](/characteristic-description/enterprise-level-features/pruning-order-by-in-subqueries.md)
+ + [自动创建支持模糊匹配的索引](/characteristic-description/enterprise-level-features/index-support-fuzzy-matching.md)
+ [应用开发接口](/characteristic-description/application-development-interfaces/application-development-interfaces.md)
+ [支持标准SQL](/characteristic-description/application-development-interfaces/1-standard-sql.md)
+ [支持标准开发接口](/characteristic-description/application-development-interfaces/2-standard-development-interfaces.md)
@@ -219,6 +219,11 @@
+ [PTK方式安装](/installation-guide/ptk-based-installation.md)
+ [手动安装](/installation-guide/manual-installation.md)
+ [推荐参数设置及新建测试库](/installation-guide/recommended-parameter-settings.md)
++ [升级指南](/upgrade-guide/upgrade-guide.md)
+ + [升级概述](/upgrade-guide/1-upgrade-overview.md)
+ + [升级前必读](/upgrade-guide/2-read-before-upgrade.md)
+ + [就地升级](/upgrade-guide/3-in-place-upgrade.md)
+ + [滚动升级](/upgrade-guide/4-rolling-upgrade.md)
+ [管理指南](/administrator-guide/administrator-guide.md)
+ [本地化](/administrator-guide/localization/localization.md)
+ [区域支持](/administrator-guide/localization/locale-support.md)
@@ -297,7 +302,6 @@
+ [导出单个数据库](/administrator-guide/importing-and-exporting-data/exporting-data/2-exporting-a-single-database.md)
+ [导出所有数据库](/administrator-guide/importing-and-exporting-data/exporting-data/3-exporting-all-databases.md)
+ [无权限角色导出数据](/administrator-guide/importing-and-exporting-data/exporting-data/4-data-export-by-a-user-without-required-permissions.md)
- + [升级指南](/administrator-guide/upgrade-guide.md)
+ [高可用指南](./high-available-guide/high-available-guide.md)
+ [DCF(Distributed Consensus Framework)](./high-available-guide/high-available-dcf.md)
+ [CM(Cluster Manager)](./high-available-guide/cluster-management/cluster-management.md)
diff --git a/product/zh/docs-mogdb/v5.0/toc_characteristic_description.md b/product/zh/docs-mogdb/v5.0/toc_characteristic_description.md
index 35fe6fc03906e741623479f7899a8e04a68eafc3..b16c1210d99c8e89dbaecbb2702dd047192df3ab 100644
--- a/product/zh/docs-mogdb/v5.0/toc_characteristic_description.md
+++ b/product/zh/docs-mogdb/v5.0/toc_characteristic_description.md
@@ -52,7 +52,6 @@
+ [MogDB/CM/PTK支持双网段](/characteristic-description/high-availability/cm-dual-network-segment-deployment.md)
+ [逻辑备份恢复效率增强](/characteristic-description/high-availability/enhanced-efficiency-of-logical-backup-and-restore.md)
+ [维护性](/characteristic-description/maintainability/maintainability.md)
- + [灰度升级](/characteristic-description/maintainability/1-gray-upgrade.md)
+ [支持WDR诊断报告](/characteristic-description/maintainability/2-workload-diagnosis-report.md)
+ [慢SQL诊断](/characteristic-description/maintainability/3-slow-sql-diagnosis.md)
+ [Session性能诊断](/characteristic-description/maintainability/4-session-performance-diagnosis.md)
@@ -143,6 +142,7 @@
+ [游标支持倒序检索](/characteristic-description/enterprise-level-features/scroll-cursor.md)
+ [支持裁剪子查询投影列](/characteristic-description/enterprise-level-features/support-for-pruning-subquery-projection-columns.md)
+ [排序列裁剪](/characteristic-description/enterprise-level-features/pruning-order-by-in-subqueries.md)
+ + [自动创建支持模糊匹配的索引](/characteristic-description/enterprise-level-features/index-support-fuzzy-matching.md)
+ [应用开发接口](/characteristic-description/application-development-interfaces/application-development-interfaces.md)
+ [支持标准SQL](/characteristic-description/application-development-interfaces/1-standard-sql.md)
+ [支持标准开发接口](/characteristic-description/application-development-interfaces/2-standard-development-interfaces.md)
diff --git a/product/zh/docs-mogdb/v5.0/toc_manage.md b/product/zh/docs-mogdb/v5.0/toc_manage.md
index a75dde9024deb8f6e1d389e539b694712161c34a..8ab7dfc54e33d62bcb5f5744b40dc5055c6ccabe 100644
--- a/product/zh/docs-mogdb/v5.0/toc_manage.md
+++ b/product/zh/docs-mogdb/v5.0/toc_manage.md
@@ -81,4 +81,3 @@
+ [导出单个数据库](/administrator-guide/importing-and-exporting-data/exporting-data/2-exporting-a-single-database.md)
+ [导出所有数据库](/administrator-guide/importing-and-exporting-data/exporting-data/3-exporting-all-databases.md)
+ [无权限角色导出数据](/administrator-guide/importing-and-exporting-data/exporting-data/4-data-export-by-a-user-without-required-permissions.md)
-+ [升级指南](/administrator-guide/upgrade-guide.md)
diff --git a/product/zh/docs-mogdb/v5.0/toc_upgrade.md b/product/zh/docs-mogdb/v5.0/toc_upgrade.md
new file mode 100644
index 0000000000000000000000000000000000000000..5b809c1f2ed4bcebb4f8670b2d4f914a2200e442
--- /dev/null
+++ b/product/zh/docs-mogdb/v5.0/toc_upgrade.md
@@ -0,0 +1,10 @@
+
+
+# MogDB Documentation 5.0
+
+## 升级指南
+
++ [升级概述](./upgrade-guide/1-upgrade-overview.md)
++ [升级前必读](./upgrade-guide/2-read-before-upgrade.md)
++ [就地升级](./upgrade-guide/3-in-place-upgrade.md)
++ [滚动升级](./upgrade-guide/4-rolling-upgrade.md)
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v5.0/upgrade-guide/1-upgrade-overview.md b/product/zh/docs-mogdb/v5.0/upgrade-guide/1-upgrade-overview.md
new file mode 100644
index 0000000000000000000000000000000000000000..6ded95e01eedadb7f9ce38c9334a4e5653d1d947
--- /dev/null
+++ b/product/zh/docs-mogdb/v5.0/upgrade-guide/1-upgrade-overview.md
@@ -0,0 +1,30 @@
+---
+title: 升级概述
+summary: 升级概述
+author: 郭欢
+date: 2024-05-17
+---
+
+# 升级概述
+
+当数据库发布的新的版本,用户根据发布信息决定使用新版本数据库时,需要做升级操作。集群升级是指在现有集群的基础上,无需导出数据的情况下,直接将数据库二进制文件及元数据升级到更高的版本。
+
+本文档主要适用于升级操作人员。操作人员必须具备以下经验和技能:
+
+- 熟悉当前网络的组网和相关网元的版本信息。
+
+- 有该设备维护经验,熟悉设备的操作维护方式。
+
+
+
+## 升级方案
+
+MogDB支持的升级方案有两种:就地升级和滚动升级。
+
+**就地升级**(推荐):升级期间需停止业务进行,一次性升级集群内所有节点。支持带元数据变更的版本升级,支持带插件升级。就地升级是最方便常用的升级方式,过程简单易操作。
+
+**滚动升级**:对于集群内的节点逐个进行升级。优点在于始终有节点能够对外提供服务,保证业务不中断。缺点在于主备节点上不同版本数据库同时运行,元数据的版本和日志存储文件的版本都不能有任何变更。不支持带插件升级。
+
+以上两种升级方式均需使用MogDB配套的部署运维工具PTK进行操作,有关PTK工具的安装升级,请参考[PTK文档](https://docs.mogdb.io/zh/ptk/v1.1/install)。
+
+请根据业务情况做好方案选择,如有疑问请联系云和恩墨工程师提供支持。
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v5.0/upgrade-guide/2-read-before-upgrade.md b/product/zh/docs-mogdb/v5.0/upgrade-guide/2-read-before-upgrade.md
new file mode 100644
index 0000000000000000000000000000000000000000..d21651400a51596ea636512a1947d906e3f5a4fc
--- /dev/null
+++ b/product/zh/docs-mogdb/v5.0/upgrade-guide/2-read-before-upgrade.md
@@ -0,0 +1,72 @@
+---
+title: 升级前必读
+summary: 升级前必读
+author: 郭欢
+date: 2024-05-17
+---
+
+# 升级前必读
+
+## 升级影响和约束
+
+升级包含以下影响和约束,在升级前应该做好充分检查和了解,确保条件都能满足的情况下再进行升级,如果有任何疑问需联系原厂工程师。
+
+- 升级操作不能和扩容、缩容同时执行。
+- 不支持虚拟IP。
+- 升级过程中,不允许对wal_level,max_connections,max_prepared_transactions,max_locks_per_transaction这四个GUC参数的值进行修改。如果修改,会导致回滚后实例启动异常。
+- 建议在数据库系统空闲情况下进行升级,尽量避开业务繁忙的时间段(可按照经验判断,如节假日等)。
+- 升级前尽可能保证数据库状态正常。通过PTK安装的版本可通过`ptk cluster -n status`命令查看集群状态,Normal代表集群所有实例正常可用。通过OM安装的版本可以通过`gs_om -t status`查询,查询结果的cluster_state为Normal代表数据库正常可用。
+- 升级前保证数据库互信正常,可以在任意节点上,通过`ssh hostname`命令,连接另外一个节点进行验证。如果各机器间互连不用输入密码,说明互信正常(通常数据库状态正常时,互信一般都是正常的)。
+- 升级前后,数据库的部署方式(配置文件)不能发生变化。升级前PTK会对部署方式进行校验,如果改变会报错。
+- 数据库运行正常且主DN的数据完全同步到备DN。
+- 升级过程中不允许打开kerberos开关。
+- 暂不支持部署了CM的集群升级,可通过PTK 1.4.0以上的版本卸载CM后升级。
+- 集群流复制参数需开启(enable_stream_replication)。
+
+
+
+## 各版本注意事项
+
+### 当前版本为3.0.X
+
+如果原数据库版本为3.0.X,需要检查是否存在包含rownum和connect by语法的视图。
+
+可以通过如下语句来获取视图定义,检查其是否存在rownum或者connect by语法:
+
+```sql
+select pg_get_viewdef('viewname') def where def like '%ROWNUM%' or def like '%CONNECT BY%' ;
+```
+
+如果存在这样的视图,需执行以下操作:
+
+1. 获取视图定义
+
+ ```sql
+ Select pg_get_viewdef('v1');
+ ```
+
+ v1代表存在rownum或者connectby语法的视图名称。
+
+2. 删除相关视图
+
+ ```sql
+ Drop view v1;
+ ```
+
+3. 升级完成后使用原视图定义重建这些视图
+
+ ```sql
+ Create view as viewdef;
+ ```
+
+ viewdef代表第一步中获取的视图定义。
+
+
+
+### 目标版本为5.0.6
+
+MogDB 5.0.6新增并行导入导出功能(详见[逻辑备份恢复效率增强](../characteristic-description/high-availability/enhanced-efficiency-of-logical-backup-and-restore.md)),该功能依赖于新增内置插件tidrangescan。升级完成后,如需使用gs_dump、gs_restore并行导入导出功能,需在要进行导入导出的库里手动创建tidrangescan插件:
+
+```sql
+create extension tidrangescan;
+```
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v5.0/upgrade-guide/3-in-place-upgrade.md b/product/zh/docs-mogdb/v5.0/upgrade-guide/3-in-place-upgrade.md
new file mode 100644
index 0000000000000000000000000000000000000000..7aa3804be1cdf035b8e5c49b7090af4d87110244
--- /dev/null
+++ b/product/zh/docs-mogdb/v5.0/upgrade-guide/3-in-place-upgrade.md
@@ -0,0 +1,128 @@
+---
+title: 就地升级
+summary: 就地升级
+author: 郭欢 候宗田 姚前
+date: 2024-05-30
+---
+
+# 就地升级
+
+就地升级是指一次性升级集群内所有节点,升级期间需停止业务进行。
+
+使用MogDB配套的部署运维工具PTK进行就地升级,是最方便常用的升级方式,过程简单易操作,只需将新版压缩包放在指定目录,然后执行对应的PTK命令,PTK就会自动完成所有检查(包括系统、磁盘、数据库状态等)、执行备份操作,然后进行升级或回滚。
+
+## 升级路径
+
+MogDB V5.0.X支持通过PTK对**V3.0.0-V3.0.X**和**V5.0.0-V5.0.X**版本的数据库进行集群升级。不支持高版本向低版本升级。
+
+## 备份数据
+
+在升级过程中,为避免执行错误出现升级异常,导致原版本数据库文件或数据被意外修改,而无法执行回滚操作的情况,升级前须做好数据备份和完整性保护,方便在升级发生错误时使用已备份的数据恢复到升级前状态,避免因操作失误导致业务无法恢复的情况出现。
+
+**在使用PTK升级过程中,工具会自动完成原版本数据库软件的备份**,如果需要备份全部的数据文件,可以使用[gs_basebackup](../reference-guide/tool-reference/tools-used-in-the-internal-system/gs_basebackup.md)进行基础的物理备份,示例如下:
+
+1. 使用数据库用户(如omm)创建备份目录
+
+ ```shell
+ mkdir /home/omm/mogdb_data_bak
+ ```
+
+2. 通过gs_basebackup进行备份
+
+ ```shell
+ gs_basebackup -D /home/omm/mogdb_data_bak -h 127.0.0.1 -p 26000
+ ```
+
+ 需根据实际情况替换主机名、端口号。
+
+## 升级操作
+
+我们需要先通过以下命令来确认当前数据库集群是否有创建过插件:
+
+```shell
+ptk cluster -n list-plugins
+```
+
+执行后会输出两个表格,第一个表格代表安装过的插件列表,安装过并不意味着数据库里使用了。第二个表格代表具体的每个数据库中创建过的插件,如果没有创建过任何插件,Extension(s)字段会为空。我们需要确认第二个表格中Extension(s)字段下是否有值,不同的情况升级的方式有些许差别。
+
+### 未创建插件的集群升级
+
+如果升级前的数据库内没有创建过任何插件,可以直接指定新版本的安装包进行升级:
+
+```shell
+ptk cluster -n upgrade [-y] -p
+```
+
+### 含有插件的集群升级
+
+如果数据库中使用了插件的话,由于升级后数据库元数据会发生改变,可能会导致升级后插件不可用或者升级失败。所以对于使用了插件的集群,需要额外指定以下参数来升级:
+
+- `--plugin-dir`: 本地目录,该目录下存放提前下载的新版本插件包(下载的插件包请勿变更文件名)
+
+- `--plugin-upgrade-patch`:插件升级所需的SQL补丁包(目标版本为**MogDB 5.0.2或更新**时,无需指定此参数)
+
+升级命令如下:
+
+```shell
+ptk cluster -n upgrade [-y] -p --plugin-dir
+```
+
+>  注意:插件版本必须和数据库版本进行匹配,如果包含插件,在数据库升级时必须对插件也进行升级。
+
+## 升级提交
+
+执行上述命令后,PTK会完成升级的完整操作,升级后集群以新版本运行,此时您可以在数据库上进行验证操作,当升级后检查集群状态为正常的情况下,可以通过以下命令提交升级,开启集群读写状态,删除旧版本的备份文件。注意,提交后集群无法再回滚,请确认正确后再提交。
+
+```shell
+ptk cluster -n upgrade-commit
+```
+
+确认提交升级后,可以通过以下命令查看集群状态:
+
+```shell
+ptk cluster -n status
+```
+
+## 升级回滚和数据恢复
+
+如果升级过程中存在报错中断,您可以通过人为介入来解决,当解决了问题后,可以通过重新执行升级指令继续完成升级。
+
+如果升级后验证发现问题可以通过upgrade-rollback命令进行回滚,PTK会将集群回滚为旧版本的状态。
+
+```shell
+ptk cluster -n upgrade-rollback
+```
+
+如果升级过程发生异常,需要从备份数据进行恢复,可执行以下操作:
+
+1. 停止数据库服务器
+
+ ```shell
+ gs_ctl stop -D $PGDATA
+ ```
+
+2. 清理原库中的所有或部分数据文件
+
+ ```shell
+ rm -rf $PGDATA/*
+ ```
+
+3. 使用数据库系统用户权限从备份中还原需要的数据库文件
+
+ ```shell
+ cp -r /home/omm/mogdb_data_bak/* $PGDATA/
+ ```
+
+4. 若数据库中存在链接文件,需要修改使其链接到正确的文件
+
+5. 重启数据库服务器,并检查数据库内容,确保数据库已经恢复到所需的状态
+
+ ```shell
+ gs_ctl start -D $PGDATA
+ ```
+
+## 注意事项
+
+在执行以上升级操作的过程中,如果发现未能按照预期正常进行,例如展示集群状态时,状态信息为异常等,需要联系原厂工程师进行解决。
+
+请在升级后所有数据库状态都验证正确以后,再执行升级提交操作,如果状态不正确,需进行回滚操作,确保数据库恢复到升级前的正确状态,然后联系原厂工程师对升级中遇到的问题进行确认。
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v5.0/upgrade-guide/4-rolling-upgrade.md b/product/zh/docs-mogdb/v5.0/upgrade-guide/4-rolling-upgrade.md
new file mode 100644
index 0000000000000000000000000000000000000000..42eda0e49fe9189143ef3eb5158ffbf10a8db99f
--- /dev/null
+++ b/product/zh/docs-mogdb/v5.0/upgrade-guide/4-rolling-upgrade.md
@@ -0,0 +1,114 @@
+---
+title: 滚动升级
+summary: 滚动升级
+author: 郭欢 候宗田 姚前
+date: 2024-05-17
+---
+
+# 滚动升级
+
+滚动升级不需要将所有节点全部停机,而是可以实现对外服务的同时进行升级操作。
+
+PTK自1.4.0版本开始支持滚动升级的能力,但由于滚动升级过程中,始终是针对备库进行升级,不会直接升级主库,所以升级过程无法提交任何SQL,也不支持带插件升级。
+
+## 升级路径
+
+滚动升级仅支持元数据无变更的版本之间升级,即升级前后数据库的内核版本需保持一致,内核版本可通过 `ptk candidate db` 输出的 `Number` 列查看(需PTK 1.4.0 以上版本):
+
+```sql
+# ptk candidate db
+ Software | Version | Number | Lifecycle Policy | Release Date
+------------+---------+--------+------------------+---------------
+ MogDB | 2.0.0 | 92.298 | LTS | 2021-05-25
+ | 2.0.1 | 92.299 | LTS | 2021-07-08
+ | 2.0.3 | 92.300 | LTS | 2022-06-29
+ | 2.0.4 | 92.302 | LTS | 2022-10-15
+ | 2.1.1 | 92.421 | Preview | 2022-03-22
+ | 3.0.0 | 92.605 | LTS | 2022-06-30
+ | 3.0.1 | 92.605 | LTS | 2022-07-30
+ | 3.0.2 | 92.605 | LTS | 2022-09-16
+ | 3.0.3 | 92.605 | LTS | 2022-10-31
+ | 3.0.4 | 92.605 | LTS | 2023-03-24
+ | 3.0.5 | 92.607 | LTS | 2023-07-20
+ | 3.0.6 | 92.607 | LTS | 2023-09-15
+ | 3.0.7 | 92.607 | LTS | 2023-12-29
+ | 3.1.0 | 92.781 | Preview | 2022-12-30
+ | 3.1.1 | 92.781 | LTS | 2023-11-26
+ | 5.0.0 | 92.848 | LTS | 2023-07-14
+ | 5.0.1 | 92.850 | LTS | 2023-08-15
+ | 5.0.2 | 92.900 | LTS | 2023-09-30
+ | 5.0.3 | 92.900 | LTS | 2023-10-27
+ | 5.0.4 | 92.901 | LTS | 2023-11-30
+ | 5.0.5 | 92.901 | LTS | 2023-12-30
+ | 5.0.6 | 92.920 | LTS | 2024-03-30
+```
+
+## 备份数据
+
+在升级过程中,为避免执行错误出现升级异常,导致原版本数据库文件或数据被意外修改,而无法执行回滚操作的情况,升级前须做好数据备份和完整性保护,方便在升级发生错误时使用已备份的数据恢复到升级前状态,避免因操作失误导致业务无法恢复的情况出现。
+
+**在使用PTK升级过程中,工具会自动完成原版本数据库软件的备份**,如果需要备份全部的数据文件,可以使用[gs_basebackup](../reference-guide/tool-reference/tools-used-in-the-internal-system/gs_basebackup.md)进行基础的物理备份,示例如下:
+
+1. 使用数据库用户(如omm)创建备份目录
+
+ ```shell
+ mkdir /home/omm/mogdb_data_bak
+ ```
+
+2. 通过gs_basebackup进行备份
+
+ ```shell
+ gs_basebackup -D /home/omm/mogdb_data_bak -h 127.0.0.1 -p 26000
+ ```
+
+ 需根据实际情况替换主机名、端口号。
+
+## 升级操作
+
+以一主一备为例,假设初始状态时主库IP为 `IP1`,备库为 `IP2`
+
+1. 检查机器状态为Normal
+
+ ```shell
+ ptk cluster -n status
+ ```
+
+2. 升级集群中的备库
+
+ 通过 `-H` 参数执行集群内一个备库进行单节点升级,该节点要能够临时切为主提供服务
+
+ ```shell
+ ptk cluster -n upgrade -p -H
+ ```
+
+3. 进行主备倒换
+
+ 将升级后的备库提升为主库,原主库降为备库
+
+ ```shell
+ ptk cluster -n switchover -H
+ ```
+
+4. 升级原来的主库
+
+ ```shell
+ ptk cluster -n upgrade -p -H
+ ```
+
+5. (可选)将主重新切换到原主机器
+
+ ```shell
+ ptk cluster -n switchover -H
+ ```
+
+6. 提交升级
+
+ ```shell
+ ptk cluster -n upgrade-commit
+ ```
+
+## 注意事项
+
+滚动升级会存在不同版本的主备同时运行的场景,因此在使用滚动升级时应确保新旧版本之间不存在元数据和日志文件格式的变更。
+
+请提前做好数据备份,在遇到问题时可以回退到升级前状态,然后将遇到的问题反馈给原厂工程师。
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v5.0/upgrade-guide/upgrade-guide.md b/product/zh/docs-mogdb/v5.0/upgrade-guide/upgrade-guide.md
new file mode 100644
index 0000000000000000000000000000000000000000..b005f971a7e5d1bb24e4f36f779ce68062c5aed4
--- /dev/null
+++ b/product/zh/docs-mogdb/v5.0/upgrade-guide/upgrade-guide.md
@@ -0,0 +1,13 @@
+---
+title: 升级指南
+summary: 升级指南
+author: guo huan
+date: 2024-05-17
+---
+
+# 升级指南
+
+- **[升级概述](./1-upgrade-overview.md)**
+- **[升级前必读](./2-read-before-upgrade.md)**
+- **[就地升级](./3-in-place-upgrade.md)**
+- **[滚动升级](./4-rolling-upgrade.md)**
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v6.0/_index.md b/product/zh/docs-mogdb/v6.0/_index.md
index aa31e410266d80984fc36fbc041ef70d50818715..b480405c504af2911cf2b72e3fd32f390a31706b 100644
--- a/product/zh/docs-mogdb/v6.0/_index.md
+++ b/product/zh/docs-mogdb/v6.0/_index.md
@@ -47,7 +47,7 @@ date: 2022-08-07
[备份与恢复](./administrator-guide/backup-and-restoration/backup-and-restoration.md)
-[升级指南](./administrator-guide/upgrade-guide.md)
+[升级指南](./upgrade-guide/upgrade-guide.md)
[故障诊断指南](./common-faults-and-identification/common-fault-locating-methods.md)
diff --git a/product/zh/docs-mogdb/v6.0/administrator-guide/administrator-guide.md b/product/zh/docs-mogdb/v6.0/administrator-guide/administrator-guide.md
index a957510edb5685effc686d520e27e07773d43ddf..9f1d5bc0b4dc6b7690ad045a2252948a58599f4f 100644
--- a/product/zh/docs-mogdb/v6.0/administrator-guide/administrator-guide.md
+++ b/product/zh/docs-mogdb/v6.0/administrator-guide/administrator-guide.md
@@ -14,5 +14,4 @@ date: 2023-05-22
- **[列存表管理](column-store-tables-management.md)**
- **[备份与恢复](backup-and-restoration/backup-and-restoration.md)**
- **[数据库部署方案](database-deployment-scenario/database-deployment-scenario.md)**
-- **[数据导出导入](importing-and-exporting-data/importing-and-exporting-data.md)**
-- **[升级指南](upgrade-guide.md)**
\ No newline at end of file
+- **[数据导出导入](importing-and-exporting-data/importing-and-exporting-data.md)**
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v6.0/administrator-guide/upgrade-guide.md b/product/zh/docs-mogdb/v6.0/administrator-guide/upgrade-guide.md
deleted file mode 100644
index 12d9c96374cdf0d025537724275d2f6d9aab4b76..0000000000000000000000000000000000000000
--- a/product/zh/docs-mogdb/v6.0/administrator-guide/upgrade-guide.md
+++ /dev/null
@@ -1,484 +0,0 @@
----
-title: 升级指南
-summary: 升级指南
-author: Zhang Cuiping
-date: 2021-09-27
----
-
-# 升级指南
-
-## 概述
-
-本文档详细的描述了版本升级、回滚流程、以及具体的操作指导,同时提供了常见的问题解答及故障处理方法。
-
-## 读者对象
-
-本文档主要适用于升级的操作人员。操作人员必须具备以下经验和技能:
-
-- 熟悉当前网络的组网和相关网元的版本信息。
-- 有该设备维护经验,熟悉设备的操作维护方式。
-
-## 升级方案
-
-本节为指导用户选择升级方式。
-
-用户根据MogDB提供的新特性和数据库现状,确定是否对现有系统进行升级。
-
-当前支持的升级模式为就地升级和灰度升级。升级方式的策略又分为大版本升级和小版本升级。版本号不变的升级方式为小版本升级,否则就是大版本升级。升级软件包的版本号在升级文件压缩包中的version.cfg的第2行查看。当前版本的版本号在$GAUSSHOME/bin下面upgrade_version文件的第2行查看。
-
-用户挑选升级方式后,系统会自动判断并选择合适的升级策略。
-
-* 就地升级: 升级期间需停止业务进行,一次性升级所有节点。
-* 灰度升级: 灰度升级支持全业务操作,也是一次性升级所有节点。(MogDB 1.1.0之后的版本支持该功能)
-
-## 升级前的版本要求(升级路径)
-
-MogDB升级版本要求如[表1](#biaoyi)所示。
-
-**表 1** 升级前的版本要求(升级路径)
-
-| 版本 | 升级说明 |
-| --------- | ---------------------------------------- |
-| MogDB 2.0 | 需要先升级到MogDB 2.1,再升级到MogDB 3.0 |
-| MogDB 2.1 | 可以升级到MogDB 3.0 |
-
->  **说明**:升级前版本,可以通过执行如下工具查看。
->
-> ```bash
-> gsql -V | --version
-> ```
-
-## 升级影响和升级约束
-
-升级过程需要注意以下事项。
-
-- 升级操作不能和扩容、缩容同时执行。
-- 不支持虚拟IP。
-- 升级过程中,不允许对wal_level,max_connections,max_prepared_transactions,max_locks_per_transaction这四个GUC参数的值进行修改。如果修改,会导致回滚后实例启动异常。
-- 建议在数据库系统空闲情况下进行升级,尽量避开业务繁忙的时间段(可按照经验判断,如节假日等)。
-- 升级前尽可能保证数据库正常。可以通过gs_om -t status查询,查询结果的cluster_state为Normal代表数据库正常。
-- 升级前保证数据库互信正常,可以在任意节点上,通过ssh hostname命令,连接另外一个节点进行验证。如果各机器间互连不用输入密码,说明互信正常(通常数据库状态正常时,互信一般都是正常的)。
-- 升级前后,数据库的部署方式(配置文件)不能发生变化。升级前会对部署方式进行校验,如果改变,会报错。
-- 升级前要保证操作系统处于健康状态,通过gs_checkos工具可以完成操作系统状态检查。
-- 就地升级需要停止业务,灰度升级支持全业务操作。
-- 数据库运行正常且主DN的数据完全同步到备DN。
-- 升级过程中不允许打开kerberos开关。
-- 请不要修改安装包中解压出来的version.cfg文件。
-- 如果升级过程中出现异常导致升级失败,需用户手动回滚,并且必须回滚成功后才能进行下一次升级。
-- 如果升级回滚成功后,再次升级成功,未提交阶段设置的GUC参数将失效。
-- 执行升级的过程中请不要手动设置GUC参数。
-- 灰度升级中,升级的时候都会产生不超过10s的业务中断
-- 升级过程中,必须保持内核版本与om版本一致才可执行om操作。这里的一致是指,内核代码和om代码都来自同一个软件包。如果执行了升级包的前置脚本却没有升级,或者升级回滚后没有执行基线包的前置脚本,就会造成内核代码和om代码的不一致。
-- 升级过程中如果系统表新增了字段,升级后通过`\d`命令将查看不到这些新增的字段。此时通过`select`命令可以查到这些新增的字段。
-- 升级需要guc参数enable_stream_replication=on,该参数为off时不允许升级。
-- 灰度升级中,业务并发要小于200并发读加200并发写的情况。
-- 若在MogDB 2.0之前的版本中使用了MOT表,则不支持升级到MogDB 2.0版本。
-- 升级过程中,请勿在当前机器上安装其他MogDB数据库集群。
-- 升级中会连接template0库,期间执行create database会报错。
-- MogDB资源池化模式集群仅支持从基线版本大于等于5.0.0的版本升级到之后的版本。
-- MogDB资源池化模式集群不支非资源池化集群升级到资源池化集群以及资源池化集群升级到非资源池化集群,不支持RDMA模式下的升级。
-- MogDB资源池化模式集群升级不再备份catalog物理文件,请在升级前使用gs_probackup备份数据,防止故障后数据丢失。
-- PL/Java升级约束
- 从3.0.0及其之前版本升级到3.1.0及其后续版本时,如果业务使用PL/Java功能且数据库实例所在机器上不存在java环境时,升级前check检查将失败。因此需提前确认是否使用到PL/Java功能和当前的JAVA版本。检查方法为:
- 1. 在数据库中使用初始化用户执行“select count(1) from pg_proc where prolang = 15;”命令。
- 1. 如果结果> 0,说明数据库使用了PL/Java,参考2进一步检查是否有Java环境。
- 2. 如果结果= 0,说明数据库没有使用PL/Java。则结束本校验,执行其他校验流程。
- 2. 在操作系统中使用root用户执行“java --version”命令。
-
- ```shell
- java --version
- ```
-
- 1. 如果Java存在,且版本等于或高于JDK1.8,则结束本校验,执行其他校验流程。
- 2. 如果Java不存在或版本低于JDK1.8,则需要参考3进行JDK的下载及Java环境变量的配置。
- 3. JDK的下载及Java环境变量的配置。
- 可从官网下载或者使用[此链接](https://www.hikunpeng.com/zh/developer/devkit/compiler/jdk)下载,并通过以下方式配置环境变量:
-
- ```shell
- export JAVA_HOME=/xxx/jdk1.xxx
- export PATH=$JAVA_HOME/bin:$PATH
- export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
- ```
-
->  **说明**:
->
-> - JDK目录及版本需根据实际路径及版本号进行替换。
->
-> - 升级检查仅校验执行升级命令的节点的Java环境变量,若其他节点也需要使用PL/Java,请同步进行JDK的下载及Java环境变量的配置,否则PL/Java将无法使用。
-
-## 升级流程
-
-本章介绍升级到该版本的主要升级过程。
-
-**图 1** 升级流程图
-
-
-
-> **说明**:本文档中描述的时间仅供参考,实际操作时间以现场情况为准。
-
-**表 2** 升级流程执行效率估计
-
- 步骤 | 建议起始时间 | 耗时(天/小时/分钟) | 业务中断时长 | 备注 |
升级前准备与检查 | 升级操作前一天 | 约2~3小时。 | 对业务无影响。 | 升级前检查和备份数据、校验软件包等操作。 |
升级操作 | 业务空闲期 | 耗时主要集中在数据库的启动和停止以及每个database的系统表修改处。升级操作耗时一般不会超过30分钟。 | 与操作时长一致,一般不会超过30分钟。 | 依据指导书开始升级。 |
升级验证 | 业务空闲期 | 约30分钟。 | 与操作时长一致,约30分钟。 | - |
提交升级 | 业务空闲期 | 提交升级耗时一般不超过10分钟。 | 与操作时长一致,一般不超过10分钟。 | - |
升级版本回滚 | 业务空闲期 | 版本回滚耗时一般不会超过30分钟。 | 与操作时长一致,一般不会超过30分钟。 | - |
-
-## 升级前准备与检查
-
-### 升级前准备与检查清单
-
-**表 3** 升级前准备清单
-
- 序号 | 升级准备项目项目 | 准备内容 | 建议起始时间 | 耗时(天/小时/分钟) |
1 | 收集节点信息 | 收集到数据库涉及节点的名称、IP地址,root、omm用户密码等环境信息。 | 升级前一天 | 1小时 |
2 | 设置root用户远程登录 | 设置配置文件,允许root用户远程登录。 | 升级前一天 | 2小时 |
3 | 备份数据 | 参考《管理指南》中的“备份与恢复”章节进行。 | 升级前一天 | 备份数据量和方案不同,耗时也不同 |
4 | 获取并校验升级包 | 获取升级软件包,进行完整性校验。 | 升级前一天 | 0.5小时 |
5 | 健康检查 | 使用gs_checkos工具完成操作系统状态检查。 | 升级前一天 | 0.5小时 |
6 | 检查数据库节点磁盘使用率 | 使用df命令查看磁盘使用率。 | 升级前一天 | 0.5小时 |
7 | 检查数据库状态 | 使用gs_om工具完成数据库状态检查。 | 升级前一天 | 0.5小时 |
-
-> **说明**:“耗时”依不同环境(包括现场数据量、服务器性能等原因)会存在一定差异。
-
-### 收集节点信息
-
-联系数据库系统管理员,获取数据库涉及节点的节点名称、节点IP地址。节点的root、omm用户密码等环境信息。
-
-**表 4** 节点信息
-
-
-
- 序号 |
- 节点名称 |
- 节点IP |
-
-root用户密码 |
- omm用户密码 |
- 备注 |
-
-
-1 |
-
-- |
-
-- |
- - |
- - |
- - |
-
-
-
-### 备份数据
-
-升级一旦失败,有可能会影响到业务的正常开展。提前备份数据,就可以在风险发生后,尽快的恢复业务。
-
-请参考《管理指南》中的[备份与恢复](../administrator-guide/backup-and-restoration/backup-and-restoration.md)章节,完成数据的备份。
-
-### 获取升级包
-
-访问[MogDB官网下载页面](https://www.mogdb.io/downloads/mogdb)获取想要升级的升级包。
-
-### 健康检查
-
-通过gs_checkos工具可以完成操作系统状态检查。
-
-**前提条件**
-
-- 当前的硬件和网络环境正常。
-- 各主机间root互信状态正常。
-- 只能使用root用户执行gs_checkos命令。
-
-> **说明**:该工具不支持独立调用,出于安全考虑,前置安装完成后会自动删除。
-
-**操作步骤**
-
-1. 以root用户身份登录服务器。
-
-2. 执行如下命令对服务器的OS参数进行检查。
-
- ```shell
- gs_checkos -i A
- ```
-
- 检查服务器的OS参数的目的是为了保证数据库正常通过预安装,并且在安装成功后可以安全高效的运行。
-
-#### 检查数据库节点磁盘使用率
-
-建议数据库节点磁盘使用率低于80%时再执行升级操作。
-
-#### 检查数据库状态
-
-本节介绍数据库状态查询的具体操作。
-
-**验证步骤**
-
-1. 以数据库用户(如omm)登录节点,source环境变量。
-
- ```shell
- su - omm
- source /home/omm/.bashrc
- ```
-
-2. 执行如下命令查看数据库状态。
-
- ```shell
- gs_om -t status
- ```
-
-3. 保证数据库状态正常。
-
-## 升级操作
-
-介绍就地升级和灰度升级的详细操作。
-
-**操作步骤**
-
-1. 以root身份登录节点。
-
-2. 创建新包目录。
-
- ```shell
- mkdir -p /opt/software/mogdb_upgrade
- ```
-
-3. 将需要更新的新包上传至目录"/opt/software/mogdb_upgrade"并解压。
-
-4. 进入安装包解压出的script目录下:
-
- ```shell
- cd /opt/software/mogdb_upgrade/script
- ```
-
-5. 创建static文件夹,将plugin插件包放到script/static文件夹下。(这一步是必须操作,因为当前版本没有判断用户有没有使用插件,所以在升级脚本中默认数据库安装使用插件,以后的版本中会将插件部分单独拆出来。)
-
- 例如:
-
- ```sql
- mkdir static
- cd static/
- wget https://cdn-mogdb.enmotech.com/mogdb-media/5.1.0/Plugins-5.1.0-CentOS-x86_64.tar.gz
- ```
-
-6. 在就地升级或灰度升级前执行前置脚本gs_preinstall。
-
- ```shell
- ./gs_preinstall -U omm -G dbgrp -X /opt/software/mogdb/clusterconfig.xml
- ```
-
-7. 切换至omm用户。
-
- ```shell
- su - omm
- ```
-
-8. 数据库状态正常时,使用如下命令进行就地升级或者灰度升级。
-
- 示例一: 使用gs_upgradectl脚本执行就地升级。
-
- ```shell
- gs_upgradectl -t auto-upgrade -X /opt/software/mogdb/clusterconfig.xml
- ```
-
- 示例二: 使用gs_upgradectl脚本执行灰度升级。
-
- ```shell
- gs_upgradectl -t auto-upgrade -X /opt/software/mogdb/clusterconfig.xml --grey
- ```
-
-## 升级验证
-
-本章介绍升级完成后的验证操作。给出验证的用例和详细操作步骤。
-
-### 验证项目的检查表
-
-**表 5** 验证项目的检查表
-
- 序号 | 验证项目 | 检查标准 | 检查结果 |
1 | 版本查询 | 查询升级后版本是否正确 | - |
2 | 健康检查 | 使用gs_checkos工具完成操作系统状态检查。 | - |
3 | 数据库状态 | 使用gs_om工具完成数据库状态检查。 | - |
-
-### 升级版本查询
-
-本节介绍版本查询的具体操作。
-
-**验证步骤**
-
-1. 以数据库用户(如omm)登录节点,source环境变量。
-
- ```shell
- su - omm
- source /home/omm/.bashrc
- ```
-
-2. 执行如下命令查看所有节点的版本信息。
-
- ```
- gs_ssh -c "gsql -V"
- ```
-
- 查看gaussdb版本,升级提交后应该为新版本
-
- ```bash
- gs_ssh -c "guassdb -V"
- ```
-
- 查看内核版本,升级提交后应该为新版本
-
- ```csharp
- gs_ssh -c "gsql -d postgres -p 5432 -c "select working_version_num();""
- ```
-
- **重点说明:** 内核版本查询出来为升级后新版本的二进制包中的version.cfg中对应的版本号,提交升级后进程中会显示(-u + 版本号),该版本号是旧版本的二进制包中的version.cfg中对应的版本号,这是因为灰度升级提交流程中,不做进程切换,是在线切换内核版本号,因此查询的进程中仍显示(-u + 旧版本的二进制包中的version.cfg中对应的版本号),实际内核版本号应根据working_version_num函数查询,用户可在业务空闲状态,重启数据库,查询的进程中就不会显示(-u + 旧版本的二进制包中的version.cfg中对应的版本号)。
-
-### 检查升级数据库状态
-
-本节介绍数据库状态查询的具体操作。
-
-**验证步骤**
-
-1. 以数据库用户(如omm)登录节点。
-
- ```shell
- su - omm
- ```
-
-2. 执行如下命令查看数据库状态。
-
- ```shell
- gs_om -t status
- ```
-
- 查询结果的cluster_state为Normal代表数据库正常。
-
-## 提交升级
-
-升级完成后,如果验证也没问题。接下来就可以提交升级。
-
->  **说明**:一旦提交操作完成,则不能再执行回滚操作。
-
-**操作步骤**
-
-1. 以数据库用户(如omm)登录节点。
-
- ```shell
- su - omm
- ```
-
-2. 执行如下命令完成升级提交。
-
- ```shell
- gs_upgradectl -t commit-upgrade -X /opt/software/mogdb/clusterconfig.xml
- ```
-
-## 升级版本回滚
-
-本章介绍版本回滚方法。
-
-**操作步骤**
-
-1. 以数据库用户(如omm)登录节点。
-
- ```shell
- su - omm
- ```
-
-2. 执行如下命令完成版本回滚(回滚内核代码)。回滚完成,如果需要保持内核和om代码的版本一致,可以执行一下旧包的前置命令(参见[执行前置脚本gs_preinstall](#qianzhijiaoben))。
-
- ```shell
- gs_upgradectl -t auto-rollback -X /opt/software/mogdb/clusterconfig.xml
- ```
-
- > **说明**:如果数据库异常,需要强制回滚,可以使用如下命令。
- >
- > ```shell
- > gs_upgradectl -t auto-rollback -X /opt/software/mogdb/clusterconfig.xml --force
- > ```
- >
- > MogDB 3.X 版本使用的新的方式建立互信,如果从MogDB 2.X升级到3.X后再回滚,执行完回滚命令后在执行旧包的前置命令之前需要执行以下两步:
- >
- > 1. 删掉集群中各个节点的 /root/gauss_om/数据库用户名(比如omm)目录。
- > 2. 去掉数据库用户的互信,需要登录集群中每个节点删掉crontab定时任务,删除~/.ssh,杀掉互信进程,删掉SSH_AUTH_SOCK,SSH_AGENT_PID两个环境变量。
-
-3. 查看回滚之后的版本号。
-
- ```shell
- gs_om -V | --version
- ```
-
-## 异常处理
-
-如果升级失败,请按照如下方式进行处理:
-
-1. 排查是否有环境问题。
-
- 如磁盘满、网络故障等,或者升级包、升级版本号是否正确。排除问题后,可以尝试重入升级。
-
-2. 如果没有发现环境问题,或者重入升级失败,需要收集相关日志,找技术支持工程师定位。
-
- 收集日志命令:
-
- ```shell
- gs_collector -begin-time='20200724 00:00' -end-time='20200725 00:00'
- ```
-
- 如果条件允许,建议保留环境。
-
-## 集群管理组件增量升级
-
-本章介绍版本集群管理组件增量升级方法。
-
-集群管理组件增量升级注意事项:
-
-- 集群管理组件增量升级操作不能和扩节点、缩节点同时执行。
-- 集群管理组件增量升级操作不需要执行前置操作。
-- 建议在数据库系统业务空闲情况下进行集群管理组件的升级,尽量避开业务繁忙时段。
-- 集群管理组件增量升级需要使用官方提供的组件包进行升级。
-- 执行集群管理组件升级需要保障集群内节点间互信正常通信(可以通过在节点间互相执行ssh命令进行检查)。
-- --upgrade-package 是指定集群管理升级包路径的参数,升级前请检查升级包的权限(属主、属组、读写权限)是否正常。
-- 升级集群管理组件后,如果进行增加节点操作(gs_expansion),为保障所有节点的集群管理组件的一致性,建议在增加节点操作完成后,再次执行集群管理组件的升级操作。
-
-### 集群管理组件升级前准备与检查
-
-**表1** 集群管理组件升级前准备清单
-
-| **序号** | **升级准备项目** | **准备内容** | **建议起始时间** | **耗时(天/小时/分钟)** |
-| -------- | ------------------------------------ | ------------------------------------------------------ | ---------------- | ------------------------ |
-| 1 | 检查安装版本是否支持集群管理组件升级 | 查看gs_upgrade升级工具的帮助信息是否包含upgrade-cm功能 | 升级前1小时 | 2分钟 |
-| 2 | 获取并校验集群管理组件升级包 | 获取升级软件包,进行完整性校验 | 升级前1小时 | 15分钟 |
-| 3 | 健康检查 | 使用gs_checkos工具完成操作系统状态检查 | 升级前1小时 | 15分钟 |
-| 4 | 检查数据库节点磁盘使用率 | 使用df命令查看磁盘使用率 | 升级前1小时 | 5分钟 |
-| 5 | 检查数据库状态 | 使用gs_om工具完成数据库状态检查 | 升级前检查 | 2分钟 |
-
->  **说明**:表1中的2-5项详细操作请参照[升级前准备与检查](#升级前准备与检查)。
-
-### 检查安装版本是否支持集群管理组件升级
-
-登录准备执行集群管理组件升级的节点,执行`gs_upgradectl --help`命令,查看帮助信息中-t参数值是否包含`upgrade-cm`选项。
-
-### 集群管理组件升级
-
-1. 以集群用户omm身份登录节点。
-
-2. 创建升级包目录。
-
- ```
- mkdir -p /opt/software/cm_upgrade
- ```
-
-3. 将需要更新的新包上传至目录“/opt/software/cm_upgrade”。
-
-4. 执行集群管理组件升级(以包名为MogDB-3.1.3-CentOS-64bit-cm.tar.gz为例,操作时请使用步骤2中上传的包名)
-
- ```
- gs_upgradectl -t upgrade-cm --upgrade-package /opt/software/cm_upgrade/MogDB-3.1.3-CentOS-64bit-cm.tar.gz
- ```
-
-### 集群管理组件升级后检查
-
-1. 使用cm_ctl工具查看集群状态是否与升级前一致或可用状态高于升级前状态。
-
- ```
- cm_ctl query -Cvd
- ```
-
-2. 查看集群临时目录下是否生成备份集群管理组件包。
-
- ```
- ll $PGHOST
- ```
-
-3. 查看集群管理组件的版本。
-
- ```
- cm_ctl -V
- ```
-
->  **注意**:执行过集群管理组件升级后,再执行增加节点操作后,新增加节点的集群管理组件是未经过升级的,需要再次执行集群管理升级以对新增加节点进行集群管理组件升级。
diff --git a/product/zh/docs-mogdb/v6.0/characteristic-description/characteristic-description-overview.md b/product/zh/docs-mogdb/v6.0/characteristic-description/characteristic-description-overview.md
index 8cdeb476c132e1c6ddab4e3e8441f58fb6254d49..ae74ca56e54018942c673b8b34d024fde141701b 100644
--- a/product/zh/docs-mogdb/v6.0/characteristic-description/characteristic-description-overview.md
+++ b/product/zh/docs-mogdb/v6.0/characteristic-description/characteristic-description-overview.md
@@ -60,7 +60,6 @@ MogDB6.0版本具有以下特性:
+ [主备高可用能力增强](./high-availability/enhanced-primary-and-standby-high-availability-capabilities.md)
+ [表级别并行恢复优化](./high-availability/table-level-parallel-recovery-optimization.md)
+ 维护性
- + [灰度升级](./maintainability/1-gray-upgrade.md)
+ [支持WDR诊断报告](./maintainability/2-workload-diagnosis-report.md)
+ [慢SQL诊断](./maintainability/3-slow-sql-diagnosis.md)
+ [Session性能诊断](./maintainability/4-session-performance-diagnosis.md)
@@ -162,7 +161,8 @@ MogDB6.0版本具有以下特性:
+ [BRIN索引](./enterprise-level-features/24-brin-index.md)
+ [BLOOM索引](./enterprise-level-features/25-bloom-index.md)
+ [事件触发器](./enterprise-level-features/event-trigger.md)
-
+ + [自动创建支持模糊匹配的索引](./enterprise-level-features/index-support-fuzzy-matching.md)
+
+ 应用开发接口
+ [支持标准SQL](./application-development-interfaces/1-standard-sql.md)
+ [支持标准开发接口](./application-development-interfaces/2-standard-development-interfaces.md)
diff --git a/product/zh/docs-mogdb/v6.0/characteristic-description/enterprise-level-features/enterprise-level-features.md b/product/zh/docs-mogdb/v6.0/characteristic-description/enterprise-level-features/enterprise-level-features.md
index e82de0c1ee07bb96ab84fde06eba9fbf1d6d4443..3bd3d2647392194e82156e1209fcb5d04b9ce93d 100644
--- a/product/zh/docs-mogdb/v6.0/characteristic-description/enterprise-level-features/enterprise-level-features.md
+++ b/product/zh/docs-mogdb/v6.0/characteristic-description/enterprise-level-features/enterprise-level-features.md
@@ -32,4 +32,5 @@ date: 2023-05-22
+ **[SQL运行时状态观测](22-sql-running-status-observation.md)**
+ **[BRIN索引](24-brin-index.md)**
+ **[BLOOM索引](25-bloom-index.md)**
-+ **[事件触发器](event-trigger.md)**
\ No newline at end of file
++ **[事件触发器](event-trigger.md)**
++ **[自动创建支持模糊匹配的索引](index-support-fuzzy-matching.md)**
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v6.0/characteristic-description/enterprise-level-features/index-support-fuzzy-matching.md b/product/zh/docs-mogdb/v6.0/characteristic-description/enterprise-level-features/index-support-fuzzy-matching.md
new file mode 100644
index 0000000000000000000000000000000000000000..b7a4bf14fb160f9d74f4a52e900a6543f177a589
--- /dev/null
+++ b/product/zh/docs-mogdb/v6.0/characteristic-description/enterprise-level-features/index-support-fuzzy-matching.md
@@ -0,0 +1,51 @@
+---
+title: 自动创建支持模糊匹配的索引
+summary: 自动创建支持模糊匹配的索引
+author: 郭欢 刘宗昊
+date: 2024-04-16
+---
+
+# 自动创建支持模糊匹配的索引
+
+## 可获得性
+
+本特性自MogDB 5.0.4版本开始引入。
+
+## 特性简介
+
+A兼容模式下,支持通过GUC参数启用自动创建支持模糊匹配的索引。
+
+## 特性描述
+
+通常在MogDB中想要创建一个支持模糊匹配的索引,需要在创建索引时指定模糊匹配的操作符类(如 `text_pattern_ops`、`varchar_pattern_ops` 或 `bpchar_pattern_ops`)。自MogDB 5.0.4版本开始,允许使用 `behavior_compat_options` 参数中的 `allow_like_indexable` 来控制这些操作符类在索引上的使用。
+
+## 特性约束
+
+`allow_like_indexable` 选项仅用于控制操作符类的使用行为,在实际使用过程中需要注意:
+
+1. 创建索引前设置该参数选项;
+2. 确保模糊匹配操作满足操作符类的使用条件。
+
+## 示例
+
+```sql
+MogDB=# create table t1(a int, b text);
+CREATE TABLE
+MogDB=# insert into t1 values (1, 'foo'), (2, 'bar');
+INSERT 0 2
+MogDB=# set behavior_compat_options='allow_like_indexable';
+SET
+MogDB=# create index on t1(b);
+CREATE INDEX
+MogDB=# explain select /*+ indexscan(t1) */ * from t1 where b like 'fo%';
+ QUERY PLAN
+--------------------------------------------------------------------
+ Index Scan using t1_b_idx on t1 (cost=0.00..8.27 rows=1 width=36)
+ Index Cond: ((b >= 'fo'::text) AND (b < 'fp'::text))
+ Filter: (b ~~ 'fo%'::text)
+(3 rows)
+```
+
+## 相关页面
+
+[behavior_compat_options](../../reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md#behavior_compat_options)
diff --git a/product/zh/docs-mogdb/v6.0/characteristic-description/maintainability/1-gray-upgrade.md b/product/zh/docs-mogdb/v6.0/characteristic-description/maintainability/1-gray-upgrade.md
deleted file mode 100644
index 9edd4cc9a3e4758d51cd8a6b083876409cc64ecd..0000000000000000000000000000000000000000
--- a/product/zh/docs-mogdb/v6.0/characteristic-description/maintainability/1-gray-upgrade.md
+++ /dev/null
@@ -1,40 +0,0 @@
----
-title: 灰度升级
-summary: 灰度升级
-author: Guo Huan
-date: 2022-05-07
----
-
-# 灰度升级
-
-## 可获得性
-
-本特性自MogDB 2.0.0版本开始引入。
-
-## 特性简介
-
-灰度升级支持全业务操作,一次性升级所有节点。
-
-## 客户价值
-
-灰度升级提供了一种在线升级的方式,保证在不中断业务的情况下,对所有的节点进行升级。
-
-## 特性描述
-
-灰度升级是一种支持所有节点升级的在线升级方式。目前灰度升级只涉及数据库二进制的替换,为了尽可能降低对于业务的影响,采用同一节点两套二进制同时存在的方式,使用软连接切换的方式来进行进程版本的切换升级(闪断一次,10秒以内)。
-
-## 特性增强
-
-无。
-
-## 特性约束
-
-灰度升级的约束条件请参见《管理指南》中的[升级指南](../../administrator-guide/upgrade-guide.md)章节。
-
-## 依赖关系
-
-无。
-
-## 相关页面
-
-[升级指南](../../administrator-guide/upgrade-guide.md)
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v6.0/characteristic-description/maintainability/maintainability.md b/product/zh/docs-mogdb/v6.0/characteristic-description/maintainability/maintainability.md
index a1723c1623af795ed1f84768192f0795f6c20ace..b2d26024bad7c7dffdc93c6c5caf45f485884ad0 100644
--- a/product/zh/docs-mogdb/v6.0/characteristic-description/maintainability/maintainability.md
+++ b/product/zh/docs-mogdb/v6.0/characteristic-description/maintainability/maintainability.md
@@ -7,7 +7,6 @@ date: 2023-05-22
# 维护性
-+ **[灰度升级](1-gray-upgrade.md)**
+ **[支持WDR诊断报告](2-workload-diagnosis-report.md)**
+ **[慢SQL诊断](3-slow-sql-diagnosis.md)**
+ **[Session性能诊断](4-session-performance-diagnosis.md)**
diff --git a/product/zh/docs-mogdb/v6.0/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md b/product/zh/docs-mogdb/v6.0/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md
index a0faf4131bd61456683911fd38de0006162db15b..4160e7c5a9c58fb8b1f8383fbbe5dc68afddc1db 100644
--- a/product/zh/docs-mogdb/v6.0/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md
+++ b/product/zh/docs-mogdb/v6.0/reference-guide/guc-parameters/version-and-platform-compatibility/platform-and-client-compatibility.md
@@ -428,6 +428,10 @@ date: 2021-04-20
(1 row)
```
+- allow_like_indexable
+
+ 配置此选项会自动创建支持模糊匹配的索引(自5.0.4版本引入)。
+
## plsql_compile_check_options
**参数说明**: 数据库兼容性行为配置项,该参数的值由若干个配置项用逗号隔开构成。
diff --git a/product/zh/docs-mogdb/v6.0/toc.md b/product/zh/docs-mogdb/v6.0/toc.md
index 7cda666ae7f09e695971452712b75cf88c023b32..fd4f4dbaf51c5a0628adf75fb8e06ea867385aff 100644
--- a/product/zh/docs-mogdb/v6.0/toc.md
+++ b/product/zh/docs-mogdb/v6.0/toc.md
@@ -9,9 +9,7 @@
+ [MogDB简介](/overview.md)
+ [MogDB与openGauss](/about-mogdb/MogDB-compared-to-openGauss.md)
+ [MogDB发布说明](/about-mogdb/mogdb-new-feature/release-note.md)
- + [MogDB 5.0.2](/about-mogdb/mogdb-new-feature/5.0.2.md)
- + [MogDB 5.0.1](/about-mogdb/mogdb-new-feature/5.0.1.md)
- + [MogDB 5.0.0](/about-mogdb/mogdb-new-feature/5.0.0.md)
+ + [MogDB 6.0.0](/about-mogdb/mogdb-new-feature/6.0.0.md)
+ [开源组件](/about-mogdb/open-source-components/open-source-components.md)
+ [容器版本的MogDB](/about-mogdb/open-source-components/2-docker-based-mogdb.md)
+ [compat-tools](/about-mogdb/open-source-components/compat-tools.md)
@@ -98,7 +96,6 @@
+ [主备高可用能力增强](/characteristic-description/high-availability/enhanced-primary-and-standby-high-availability-capabilities.md)
+ [表级别并行恢复优化](/characteristic-description/high-availability/table-level-parallel-recovery-optimization.md)
+ [维护性](/characteristic-description/maintainability/maintainability.md)
- + [灰度升级](/characteristic-description/maintainability/1-gray-upgrade.md)
+ [支持WDR诊断报告](/characteristic-description/maintainability/2-workload-diagnosis-report.md)
+ [慢SQL诊断](/characteristic-description/maintainability/3-slow-sql-diagnosis.md)
+ [Session性能诊断](/characteristic-description/maintainability/4-session-performance-diagnosis.md)
@@ -204,6 +201,7 @@
+ [BRIN索引](/characteristic-description/enterprise-level-features/24-brin-index.md)
+ [BLOOM索引](/characteristic-description/enterprise-level-features/25-bloom-index.md)
+ [事件触发器](/characteristic-description/enterprise-level-features/event-trigger.md)
+ + [自动创建支持模糊匹配的索引](/characteristic-description/enterprise-level-features/index-support-fuzzy-matching.md)
+ [应用开发接口](/characteristic-description/application-development-interfaces/application-development-interfaces.md)
+ [支持标准SQL](/characteristic-description/application-development-interfaces/1-standard-sql.md)
+ [支持标准开发接口](/characteristic-description/application-development-interfaces/2-standard-development-interfaces.md)
@@ -236,6 +234,11 @@
+ [PTK方式安装](/installation-guide/ptk-based-installation.md)
+ [手动安装](/installation-guide/manual-installation.md)
+ [推荐参数设置及新建测试库](/installation-guide/recommended-parameter-settings.md)
++ [升级指南](/upgrade-guide/upgrade-guide.md)
+ + [升级概述](/upgrade-guide/1-upgrade-overview.md)
+ + [升级前必读](/upgrade-guide/2-read-before-upgrade.md)
+ + [就地升级](/upgrade-guide/3-in-place-upgrade.md)
+ + [滚动升级](/upgrade-guide/4-rolling-upgrade.md)
+ [管理指南](/administrator-guide/administrator-guide.md)
+ [本地化](/administrator-guide/localization/localization.md)
+ [区域支持](/administrator-guide/localization/locale-support.md)
@@ -316,7 +319,6 @@
+ [导出单个数据库](/administrator-guide/importing-and-exporting-data/exporting-data/2-exporting-a-single-database.md)
+ [导出所有数据库](/administrator-guide/importing-and-exporting-data/exporting-data/3-exporting-all-databases.md)
+ [无权限角色导出数据](/administrator-guide/importing-and-exporting-data/exporting-data/4-data-export-by-a-user-without-required-permissions.md)
- + [升级指南](/administrator-guide/upgrade-guide.md)
+ [高可用指南](./high-available-guide/high-available-guide.md)
+ [DCF(Distributed Consensus Framework)](./high-available-guide/high-available-dcf.md)
+ [CM(Cluster Manager)](./high-available-guide/cluster-management/cluster-management.md)
diff --git a/product/zh/docs-mogdb/v6.0/toc_characteristic_description.md b/product/zh/docs-mogdb/v6.0/toc_characteristic_description.md
index 0a8ba2cea303d3eeb103c28d6fa637e7bfcf7f67..900e2c41808c952e800f6a4f5acf33c3da9466ec 100644
--- a/product/zh/docs-mogdb/v6.0/toc_characteristic_description.md
+++ b/product/zh/docs-mogdb/v6.0/toc_characteristic_description.md
@@ -58,7 +58,6 @@
+ [主备高可用能力增强](/characteristic-description/high-availability/enhanced-primary-and-standby-high-availability-capabilities.md)
+ [表级别并行恢复优化](/characteristic-description/high-availability/table-level-parallel-recovery-optimization.md)
+ [维护性](/characteristic-description/maintainability/maintainability.md)
- + [灰度升级](/characteristic-description/maintainability/1-gray-upgrade.md)
+ [支持WDR诊断报告](/characteristic-description/maintainability/2-workload-diagnosis-report.md)
+ [慢SQL诊断](/characteristic-description/maintainability/3-slow-sql-diagnosis.md)
+ [Session性能诊断](/characteristic-description/maintainability/4-session-performance-diagnosis.md)
@@ -164,6 +163,7 @@
+ [BRIN索引](/characteristic-description/enterprise-level-features/24-brin-index.md)
+ [BLOOM索引](/characteristic-description/enterprise-level-features/25-bloom-index.md)
+ [事件触发器](/characteristic-description/enterprise-level-features/event-trigger.md)
+ + [自动创建支持模糊匹配的索引](/characteristic-description/enterprise-level-features/index-support-fuzzy-matching.md)
+ [应用开发接口](/characteristic-description/application-development-interfaces/application-development-interfaces.md)
+ [支持标准SQL](/characteristic-description/application-development-interfaces/1-standard-sql.md)
+ [支持标准开发接口](/characteristic-description/application-development-interfaces/2-standard-development-interfaces.md)
diff --git a/product/zh/docs-mogdb/v6.0/toc_manage.md b/product/zh/docs-mogdb/v6.0/toc_manage.md
index 6dc5381f15a0e6b101878d471ab30ae244c6ba91..75384c4dad8a4583742f1850f2d2c15ba17845b5 100644
--- a/product/zh/docs-mogdb/v6.0/toc_manage.md
+++ b/product/zh/docs-mogdb/v6.0/toc_manage.md
@@ -84,4 +84,3 @@
+ [导出单个数据库](/administrator-guide/importing-and-exporting-data/exporting-data/2-exporting-a-single-database.md)
+ [导出所有数据库](/administrator-guide/importing-and-exporting-data/exporting-data/3-exporting-all-databases.md)
+ [无权限角色导出数据](/administrator-guide/importing-and-exporting-data/exporting-data/4-data-export-by-a-user-without-required-permissions.md)
-+ [升级指南](/administrator-guide/upgrade-guide.md)
diff --git a/product/zh/docs-mogdb/v6.0/toc_upgrade.md b/product/zh/docs-mogdb/v6.0/toc_upgrade.md
new file mode 100644
index 0000000000000000000000000000000000000000..c22bc938b9f72e5c25a5d6ae962edbc96c520c4c
--- /dev/null
+++ b/product/zh/docs-mogdb/v6.0/toc_upgrade.md
@@ -0,0 +1,10 @@
+
+
+# MogDB Documentation 6.0
+
+## 升级指南
+
++ [升级概述](./upgrade-guide/1-upgrade-overview.md)
++ [升级前必读](./upgrade-guide/2-read-before-upgrade.md)
++ [就地升级](./upgrade-guide/3-in-place-upgrade.md)
++ [滚动升级](./upgrade-guide/4-rolling-upgrade.md)
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v6.0/upgrade-guide/1-upgrade-overview.md b/product/zh/docs-mogdb/v6.0/upgrade-guide/1-upgrade-overview.md
new file mode 100644
index 0000000000000000000000000000000000000000..6ded95e01eedadb7f9ce38c9334a4e5653d1d947
--- /dev/null
+++ b/product/zh/docs-mogdb/v6.0/upgrade-guide/1-upgrade-overview.md
@@ -0,0 +1,30 @@
+---
+title: 升级概述
+summary: 升级概述
+author: 郭欢
+date: 2024-05-17
+---
+
+# 升级概述
+
+当数据库发布的新的版本,用户根据发布信息决定使用新版本数据库时,需要做升级操作。集群升级是指在现有集群的基础上,无需导出数据的情况下,直接将数据库二进制文件及元数据升级到更高的版本。
+
+本文档主要适用于升级操作人员。操作人员必须具备以下经验和技能:
+
+- 熟悉当前网络的组网和相关网元的版本信息。
+
+- 有该设备维护经验,熟悉设备的操作维护方式。
+
+
+
+## 升级方案
+
+MogDB支持的升级方案有两种:就地升级和滚动升级。
+
+**就地升级**(推荐):升级期间需停止业务进行,一次性升级集群内所有节点。支持带元数据变更的版本升级,支持带插件升级。就地升级是最方便常用的升级方式,过程简单易操作。
+
+**滚动升级**:对于集群内的节点逐个进行升级。优点在于始终有节点能够对外提供服务,保证业务不中断。缺点在于主备节点上不同版本数据库同时运行,元数据的版本和日志存储文件的版本都不能有任何变更。不支持带插件升级。
+
+以上两种升级方式均需使用MogDB配套的部署运维工具PTK进行操作,有关PTK工具的安装升级,请参考[PTK文档](https://docs.mogdb.io/zh/ptk/v1.1/install)。
+
+请根据业务情况做好方案选择,如有疑问请联系云和恩墨工程师提供支持。
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v6.0/upgrade-guide/2-read-before-upgrade.md b/product/zh/docs-mogdb/v6.0/upgrade-guide/2-read-before-upgrade.md
new file mode 100644
index 0000000000000000000000000000000000000000..125462bc264029913a5bced61ef4baeb9afe8f5e
--- /dev/null
+++ b/product/zh/docs-mogdb/v6.0/upgrade-guide/2-read-before-upgrade.md
@@ -0,0 +1,62 @@
+---
+title: 升级前必读
+summary: 升级前必读
+author: 郭欢
+date: 2024-05-17
+---
+
+# 升级前必读
+
+## 升级影响和约束
+
+升级包含以下影响和约束,在升级前应该做好充分检查和了解,确保条件都能满足的情况下再进行升级,如果有任何疑问需联系原厂工程师。
+
+- 升级操作不能和扩容、缩容同时执行。
+- 不支持虚拟IP。
+- 升级过程中,不允许对wal_level,max_connections,max_prepared_transactions,max_locks_per_transaction这四个GUC参数的值进行修改。如果修改,会导致回滚后实例启动异常。
+- 建议在数据库系统空闲情况下进行升级,尽量避开业务繁忙的时间段(可按照经验判断,如节假日等)。
+- 升级前尽可能保证数据库状态正常。通过PTK安装的版本可通过`ptk cluster -n status`命令查看集群状态,Normal代表集群所有实例正常可用。通过OM安装的版本可以通过`gs_om -t status`查询,查询结果的cluster_state为Normal代表数据库正常可用。
+- 升级前保证数据库互信正常,可以在任意节点上,通过`ssh hostname`命令,连接另外一个节点进行验证。如果各机器间互连不用输入密码,说明互信正常(通常数据库状态正常时,互信一般都是正常的)。
+- 升级前后,数据库的部署方式(配置文件)不能发生变化。升级前PTK会对部署方式进行校验,如果改变会报错。
+- 数据库运行正常且主DN的数据完全同步到备DN。
+- 升级过程中不允许打开kerberos开关。
+- 暂不支持部署了CM的集群升级,可通过PTK 1.4.0以上的版本卸载CM后升级。
+- 集群流复制参数需开启(enable_stream_replication)。
+
+
+
+## 各版本注意事项
+
+### 当前版本为3.0.X
+
+如果原数据库版本为3.0.X,需要检查是否存在包含rownum和connect by语法的视图。
+
+可以通过如下语句来获取视图定义,检查其是否存在rownum或者connect by语法:
+
+```sql
+select pg_get_viewdef('viewname') def where def like '%ROWNUM%' or def like '%CONNECT BY%' ;
+```
+
+如果存在这样的视图,需执行以下操作:
+
+1. 获取视图定义
+
+ ```sql
+ Select pg_get_viewdef('v1');
+ ```
+
+ v1代表存在rownum或者connectby语法的视图名称。
+
+2. 删除相关视图
+
+ ```sql
+ Drop view v1;
+ ```
+
+3. 升级完成后使用原视图定义重建这些视图
+
+ ```sql
+ Create view as viewdef;
+ ```
+
+ viewdef代表第一步中获取的视图定义。
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v6.0/upgrade-guide/3-in-place-upgrade.md b/product/zh/docs-mogdb/v6.0/upgrade-guide/3-in-place-upgrade.md
new file mode 100644
index 0000000000000000000000000000000000000000..b0565e8f001101019c285d3c157aab14d000a0a3
--- /dev/null
+++ b/product/zh/docs-mogdb/v6.0/upgrade-guide/3-in-place-upgrade.md
@@ -0,0 +1,126 @@
+---
+title: 就地升级
+summary: 就地升级
+author: 郭欢 候宗田 姚前
+date: 2024-05-30
+---
+
+# 就地升级
+
+就地升级是指一次性升级集群内所有节点,升级期间需停止业务进行。
+
+使用MogDB配套的部署运维工具PTK进行就地升级,是最方便常用的升级方式,过程简单易操作,只需将新版压缩包放在指定目录,然后执行对应的PTK命令,PTK就会自动完成所有检查(包括系统、磁盘、数据库状态等)、执行备份操作,然后进行升级或回滚。
+
+## 升级路径
+
+待补充
+
+## 备份数据
+
+在升级过程中,为避免执行错误出现升级异常,导致原版本数据库文件或数据被意外修改,而无法执行回滚操作的情况,升级前须做好数据备份和完整性保护,方便在升级发生错误时使用已备份的数据恢复到升级前状态,避免因操作失误导致业务无法恢复的情况出现。
+
+**在使用PTK升级过程中,工具会自动完成原版本数据库软件的备份**,如果需要备份全部的数据文件,可以使用[gs_basebackup](../reference-guide/tool-reference/tools-used-in-the-internal-system/gs_basebackup.md)进行基础的物理备份,示例如下:
+
+1. 使用数据库用户(如omm)创建备份目录
+
+ ```shell
+ mkdir /home/omm/mogdb_data_bak
+ ```
+
+2. 通过gs_basebackup进行备份
+
+ ```shell
+ gs_basebackup -D /home/omm/mogdb_data_bak -h 127.0.0.1 -p 26000
+ ```
+
+ 需根据实际情况替换主机名、端口号。
+
+## 升级操作
+
+我们需要先通过以下命令来确认当前数据库集群是否有创建过插件:
+
+```shell
+ptk cluster -n list-plugins
+```
+
+执行后会输出两个表格,第一个表格代表安装过的插件列表,安装过并不意味着数据库里使用了。第二个表格代表具体的每个数据库中创建过的插件,如果没有创建过任何插件,Extension(s)字段会为空。我们需要确认第二个表格中Extension(s)字段下是否有值,不同的情况升级的方式有些许差别。
+
+### 未创建插件的集群升级
+
+如果升级前的数据库内没有创建过任何插件,可以直接指定新版本的安装包进行升级:
+
+```shell
+ptk cluster -n upgrade [-y] -p
+```
+
+### 含有插件的集群升级
+
+如果数据库中使用了插件的话,由于升级后数据库元数据会发生改变,可能会导致升级后插件不可用或者升级失败。所以对于使用了插件的集群,需要额外指定以下参数来升级:
+
+- `--plugin-dir`: 本地目录,该目录下存放提前下载的新版本插件包(下载的插件包请勿变更文件名)
+
+升级命令如下:
+
+```shell
+ptk cluster -n upgrade [-y] -p --plugin-dir
+```
+
+>  注意:插件版本必须和数据库版本进行匹配,如果包含插件,在数据库升级时必须对插件也进行升级。
+
+## 升级提交
+
+执行上述命令后,PTK会完成升级的完整操作,升级后集群以新版本运行,此时您可以在数据库上进行验证操作,当升级后检查集群状态为正常的情况下,可以通过以下命令提交升级,开启集群读写状态,删除旧版本的备份文件。注意,提交后集群无法再回滚,请确认正确后再提交。
+
+```shell
+ptk cluster -n upgrade-commit
+```
+
+确认提交升级后,可以通过以下命令查看集群状态:
+
+```shell
+ptk cluster -n status
+```
+
+## 升级回滚和数据恢复
+
+如果升级过程中存在报错中断,您可以通过人为介入来解决,当解决了问题后,可以通过重新执行升级指令继续完成升级。
+
+如果升级后验证发现问题可以通过upgrade-rollback命令进行回滚,PTK会将集群回滚为旧版本的状态。
+
+```shell
+ptk cluster -n upgrade-rollback
+```
+
+如果升级过程发生异常,需要从备份数据进行恢复,可执行以下操作:
+
+1. 停止数据库服务器
+
+ ```shell
+ gs_ctl stop -D $PGDATA
+ ```
+
+2. 清理原库中的所有或部分数据文件
+
+ ```shell
+ rm -rf $PGDATA/*
+ ```
+
+3. 使用数据库系统用户权限从备份中还原需要的数据库文件
+
+ ```shell
+ cp -r /home/omm/mogdb_data_bak/* $PGDATA/
+ ```
+
+4. 若数据库中存在链接文件,需要修改使其链接到正确的文件
+
+5. 重启数据库服务器,并检查数据库内容,确保数据库已经恢复到所需的状态
+
+ ```shell
+ gs_ctl start -D $PGDATA
+ ```
+
+## 注意事项
+
+在执行以上升级操作的过程中,如果发现未能按照预期正常进行,例如展示集群状态时,状态信息为异常等,需要联系原厂工程师进行解决。
+
+请在升级后所有数据库状态都验证正确以后,再执行升级提交操作,如果状态不正确,需进行回滚操作,确保数据库恢复到升级前的正确状态,然后联系原厂工程师对升级中遇到的问题进行确认。
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v6.0/upgrade-guide/4-rolling-upgrade.md b/product/zh/docs-mogdb/v6.0/upgrade-guide/4-rolling-upgrade.md
new file mode 100644
index 0000000000000000000000000000000000000000..42eda0e49fe9189143ef3eb5158ffbf10a8db99f
--- /dev/null
+++ b/product/zh/docs-mogdb/v6.0/upgrade-guide/4-rolling-upgrade.md
@@ -0,0 +1,114 @@
+---
+title: 滚动升级
+summary: 滚动升级
+author: 郭欢 候宗田 姚前
+date: 2024-05-17
+---
+
+# 滚动升级
+
+滚动升级不需要将所有节点全部停机,而是可以实现对外服务的同时进行升级操作。
+
+PTK自1.4.0版本开始支持滚动升级的能力,但由于滚动升级过程中,始终是针对备库进行升级,不会直接升级主库,所以升级过程无法提交任何SQL,也不支持带插件升级。
+
+## 升级路径
+
+滚动升级仅支持元数据无变更的版本之间升级,即升级前后数据库的内核版本需保持一致,内核版本可通过 `ptk candidate db` 输出的 `Number` 列查看(需PTK 1.4.0 以上版本):
+
+```sql
+# ptk candidate db
+ Software | Version | Number | Lifecycle Policy | Release Date
+------------+---------+--------+------------------+---------------
+ MogDB | 2.0.0 | 92.298 | LTS | 2021-05-25
+ | 2.0.1 | 92.299 | LTS | 2021-07-08
+ | 2.0.3 | 92.300 | LTS | 2022-06-29
+ | 2.0.4 | 92.302 | LTS | 2022-10-15
+ | 2.1.1 | 92.421 | Preview | 2022-03-22
+ | 3.0.0 | 92.605 | LTS | 2022-06-30
+ | 3.0.1 | 92.605 | LTS | 2022-07-30
+ | 3.0.2 | 92.605 | LTS | 2022-09-16
+ | 3.0.3 | 92.605 | LTS | 2022-10-31
+ | 3.0.4 | 92.605 | LTS | 2023-03-24
+ | 3.0.5 | 92.607 | LTS | 2023-07-20
+ | 3.0.6 | 92.607 | LTS | 2023-09-15
+ | 3.0.7 | 92.607 | LTS | 2023-12-29
+ | 3.1.0 | 92.781 | Preview | 2022-12-30
+ | 3.1.1 | 92.781 | LTS | 2023-11-26
+ | 5.0.0 | 92.848 | LTS | 2023-07-14
+ | 5.0.1 | 92.850 | LTS | 2023-08-15
+ | 5.0.2 | 92.900 | LTS | 2023-09-30
+ | 5.0.3 | 92.900 | LTS | 2023-10-27
+ | 5.0.4 | 92.901 | LTS | 2023-11-30
+ | 5.0.5 | 92.901 | LTS | 2023-12-30
+ | 5.0.6 | 92.920 | LTS | 2024-03-30
+```
+
+## 备份数据
+
+在升级过程中,为避免执行错误出现升级异常,导致原版本数据库文件或数据被意外修改,而无法执行回滚操作的情况,升级前须做好数据备份和完整性保护,方便在升级发生错误时使用已备份的数据恢复到升级前状态,避免因操作失误导致业务无法恢复的情况出现。
+
+**在使用PTK升级过程中,工具会自动完成原版本数据库软件的备份**,如果需要备份全部的数据文件,可以使用[gs_basebackup](../reference-guide/tool-reference/tools-used-in-the-internal-system/gs_basebackup.md)进行基础的物理备份,示例如下:
+
+1. 使用数据库用户(如omm)创建备份目录
+
+ ```shell
+ mkdir /home/omm/mogdb_data_bak
+ ```
+
+2. 通过gs_basebackup进行备份
+
+ ```shell
+ gs_basebackup -D /home/omm/mogdb_data_bak -h 127.0.0.1 -p 26000
+ ```
+
+ 需根据实际情况替换主机名、端口号。
+
+## 升级操作
+
+以一主一备为例,假设初始状态时主库IP为 `IP1`,备库为 `IP2`
+
+1. 检查机器状态为Normal
+
+ ```shell
+ ptk cluster -n status
+ ```
+
+2. 升级集群中的备库
+
+ 通过 `-H` 参数执行集群内一个备库进行单节点升级,该节点要能够临时切为主提供服务
+
+ ```shell
+ ptk cluster -n upgrade -p -H
+ ```
+
+3. 进行主备倒换
+
+ 将升级后的备库提升为主库,原主库降为备库
+
+ ```shell
+ ptk cluster -n switchover -H
+ ```
+
+4. 升级原来的主库
+
+ ```shell
+ ptk cluster -n upgrade -p -H
+ ```
+
+5. (可选)将主重新切换到原主机器
+
+ ```shell
+ ptk cluster -n switchover -H
+ ```
+
+6. 提交升级
+
+ ```shell
+ ptk cluster -n upgrade-commit
+ ```
+
+## 注意事项
+
+滚动升级会存在不同版本的主备同时运行的场景,因此在使用滚动升级时应确保新旧版本之间不存在元数据和日志文件格式的变更。
+
+请提前做好数据备份,在遇到问题时可以回退到升级前状态,然后将遇到的问题反馈给原厂工程师。
\ No newline at end of file
diff --git a/product/zh/docs-mogdb/v6.0/upgrade-guide/upgrade-guide.md b/product/zh/docs-mogdb/v6.0/upgrade-guide/upgrade-guide.md
new file mode 100644
index 0000000000000000000000000000000000000000..b005f971a7e5d1bb24e4f36f779ce68062c5aed4
--- /dev/null
+++ b/product/zh/docs-mogdb/v6.0/upgrade-guide/upgrade-guide.md
@@ -0,0 +1,13 @@
+---
+title: 升级指南
+summary: 升级指南
+author: guo huan
+date: 2024-05-17
+---
+
+# 升级指南
+
+- **[升级概述](./1-upgrade-overview.md)**
+- **[升级前必读](./2-read-before-upgrade.md)**
+- **[就地升级](./3-in-place-upgrade.md)**
+- **[滚动升级](./4-rolling-upgrade.md)**
\ No newline at end of file
diff --git a/scripts/build_pdf.sh b/scripts/build_pdf.sh
index 4a345488f35ba13584c065b231dabceff5387fbb..5845c78d6f7ca58a19807b4a6bd1943831126628 100755
--- a/scripts/build_pdf.sh
+++ b/scripts/build_pdf.sh
@@ -104,7 +104,8 @@ declare -A mogdbZn210Title=( \
["toc_system-catalogs-and-functions"]="MogDB-数据库系统表及函数指南" \
["toc_dev"]="MogDB-数据库开发者指南" \
["toc_extension-referecne"]="MogDB-数据库插件指南" \
- ["toc_high_available"]="MogDB-高可用指南" \
+ ["toc_high_available"]="MogDB-数据库高可用指南" \
+ ["toc_upgrade"]="MogDB-数据库升级指南" \
)
declare -A mogdbEn210Title=( \
["toc_parameters-and-tools"]="MogDB-Database-Parameter-and-Tool-Reference" \
@@ -122,6 +123,7 @@ declare -A mogdbEn210Title=( \
["toc_dev"]="MogDB-Database-Developer-Guide" \
["toc_extension-referecne"]="MogDB-Database-Extension-Reference" \
["toc_high_available"]="MogDB-Database-High-Available-Guide" \
+ ["toc_upgrade"]="MogDB-Database-Upgrade-Guide" \
)
scaDocsVersions=("v5.0" "v5.1")