A method, apparatus, and electronic device for creating and reconstructing a duplicate name index based on openGauss.

By rewriting index names in openGauss and using invisible delimiters to append table OIDs, the index naming conflict problem when migrating MySQL databases to openGauss was resolved, enabling the management of indexes with the same name in the same namespace and improving migration efficiency and compatibility.

CN120910050BActive Publication Date: 2026-06-30BEIJING VASTDATA TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING VASTDATA TECH
Filing Date
2025-08-12
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

When migrating a MySQL database to openGauss, openGauss requires index names to be unique within the same database, while MySQL allows indexes to have the same name across tables. This can lead to index naming conflicts during the migration process, affecting the feasibility of the migration and data compatibility. Existing solutions are inefficient, error-prone, and have high maintenance costs.

Method used

By introducing an index name rewriting mechanism in openGauss, the table OID is appended to the index name using the ASCII code 0x1F as an invisible separator, forming the format "index name_0x1F table OID", which ensures the uniqueness of the index name, and the REINDEX command is used to achieve a smooth transition between the old and new index formats.

Benefits of technology

It improves database migration efficiency and compatibility, reduces manual intervention costs, ensures consistency and accuracy in large-scale database migration, and has good scalability and backward compatibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910050B_ABST
    Figure CN120910050B_ABST
Patent Text Reader

Abstract

This application relates to a method and apparatus for creating and rebuilding indexes with duplicate names based on openGauss, aiming to solve compatibility issues caused by index naming conflicts when migrating heterogeneous databases such as MySQL to openGauss. This method controls the on / off state of the duplicate index function through the GUC parameter ENABLE_DUPLICATE_INDEXNAME: when enabled, the index name of the user table is rewritten (attaching the table OID and the ASCII 0x1F invisible separator), generating a unique system storage name and writing it to system tables such as pg_class; a REINDEX mechanism is provided to achieve a smooth transition between the old and new index formats; and transparent resolution of user operations (such as INDEX HINT) is supported. This method is compatible with MySQL cross-table indexes with duplicate names without violating the global uniqueness constraints of openGauss indexes, improving migration efficiency and system compatibility. Furthermore, mechanisms such as automatic rewriting and parameter control reduce manual costs and ensure the accuracy and stability of large-scale database migrations.
Need to check novelty before this filing date? Find Prior Art