opengauss:7.0.0-RC3 crashes when exporting

When I exported the database, it crashed directly,

After adding the exclude-function parameter, it can be exported as:

Is this a version bug?

The answer content is generated by AI and is for reference only:

V. Conclusion and Recommendations

  • Conclusion: The phenomenon can be identified as ‘Failure during the export phase of functions and stored procedures’, and --exclude-function is a workaround. However, the current available information is insufficient to determine whether this is a version bug in 7.0.0-RC3.
  • Recommendation: Since this issue is not recorded in the provided knowledge materials, it is recommended to report and confirm it on the openGauss community forum with the following information: the complete query failed error message text, database version information (compile date and commit, for example, the specific build number of 7.0.0-RC3), and whether this query failure can be traced back to a specific function definition (such as custom type parameters, special prokind, etc.). Only then can it be determined whether this is a general defect or an exception caused by a specific object.

If you can provide the complete error stack trace of this failure, or confirm whether there are any custom functions with special parameter types in the thingsboard library, I can further analyze and organize the information based on more context.

Click here to view the detailed analysis and answer

Analysis of the Crash During Export Using openGauss 7.0.0-RC3’s gs_dump

I. Can this be confirmed as a version bug?

Based on the information currently provided, it cannot be confirmed as a version bug in 7.0.0-RC3. There are no records in the existing materials about this version’s gs_dump encountering a query failed error during the ‘exporting objects’ phase, nor are there any related known issues. The only discussion thread in the materials that mentions gs_dump errors is related to a different problem: using gs_dump to export a tar file after pulling the latest openGauss image on a Mac and running gs_restore, which results in an error unsupported version (1.13) in file header. This is a different phenomenon from the crash during export in this case and cannot be used as a basis for judgment.

II. Facts confirmed from the logs

Based on the two log excerpts you provided, the following can be confirmed:

  1. Location of the crash: The logs first complete the database scan (Finish scanning database), then proceed to Start dumping objects and report a query failed error. This indicates that the issue arises during the metadata phase of exporting objects, not at the connection, permission, or data retrieval level.

  2. Type of failed statement: The error statement queries fields such as proname, prorettype, proargtypes, pg_catalog.pg_get_function_arguments(...) and pg_get_function_result(...), which belong to queries for function and stored procedure definition information.

  3. --exclude-function bypasses the issue: When this parameter is added, the database scan and object export are fully completed, successfully exporting 6135 objects (total time: 9260 ms), which indicates that the issue is concentrated on the exporting of function and stored procedure objects, not on the overall database or data itself.

Combined with the definition of --exclude-function in the materials: the purpose of this parameter is to ‘exclude functions and stored procedures’. Therefore, adding this parameter effectively skips the problematic object type, allowing the issue to be avoided, although not resolved.

III. Necessary considerations

Although --exclude-function allows you to get a usable tar file, the following must be noted:

  • The exported file does not include definitions of functions and stored procedures;
  • After using gs_restore to restore, these functions and stored procedures must be recreated separately, otherwise the business logic that depends on them will be missing.

Thus, this solution can only be used as a temporary workaround, and is not suitable as a final backup solution.

IV. Other constraints related to this operation in the materials

  • Execution user: gs_dump must be executed by the operating system user who installed the openGauss database (i.e., omm). You are currently using omm for execution, which meets the requirement. Users such as root and admin cannot execute it due to a lack of environment variable configuration.
  • Parallel export: The -j parameter supports multi-threaded parallel export, but only starting from the 7.0.0 version. You’re using 7.0.0-RC3, which theoretically supports this feature, but it was not used in this instance.
  • Unsupported objects: Temporary tables are not supported for import and export; materialized views can be exported in terms of definition, but their data is not exported.
  • Primary and standby limitations: gs_dump is only used for the primary database (Primary), and does not support exporting data from the standby database (Standby) or cascading standby (Cascade Standby).
  • File immutability: The files and their contents exported in the -F c/d/t format must not be modified, otherwise successful restoration may not be possible.
  • Data consistency: gs_dump adds shared locks to tables that need to be dumped; the exported result corresponds to a consistent snapshot at the moment the export was started, and subsequent modifications will not be exported. You used --lock-wait-timeout 60000, which is related to handling locks.

V. Conclusion and Recommendations

  • Conclusion: The phenomenon can be identified as ‘Failure during the export phase of functions and stored procedures’, and --exclude-function is a workaround. However, current available data is insufficient to determine whether it is a version bug in 7.0.0-RC3.
  • Recommendation: Since this issue is not documented in the provided materials, it is recommended to report and verify it on the openGauss community forum with the following information: the complete query failed error text, database version information (compile date and commit, for example, the specific build number of 7.0.0-RC3), and whether it is possible to identify a specific function definition (such as custom type parameters, special prokind, etc.) that triggers this query failure. Only then can it be confirmed whether the issue is a general defect or specific to an object.

If you can provide the full error stack trace of this failure, or confirm if there are any custom functions with special parameter types in the thingsboard library, I can further analyze and organize the information based on additional context.

It looks like a bug; you can keep an eye on the subsequent fix or try using the 7.0.0 LTS version.