robertmu opened a new pull request, #34: URL: https://github.com/apache/cloudberry-gpbackup/pull/34
The original logic for detecting pre-GPDB6 backups was designed for a Greenplum-only environment. In that context, the `gpbackup` process stripped the `(Greenplum Database ...)` prefix, and the restore logic correctly parsed the raw version number from `config.yaml`. With the introduction of support for Cloudberry, `config.yaml` now retains the full, prefixed version string to differentiate between database vendors. The existing restore logic was not designed to handle these prefixed strings and would fail to parse the major version correctly, leading to improper `gp_use_legacy_hashops` settings and data distribution errors. This commit refactors the detection mechanism to be database-aware. It now uses the standard `dbconn.GPDBVersion.ParseVersionInfo` to robustly handle various version formats. The logic now explicitly checks if the backup is from Greenplum (`IsGPDB()`) before checking if it is a legacy version (`Before("6")`). This ensures restore operations are reliable in a multi-database environment, correctly applying legacy settings only to actual legacy Greenplum backups while properly handling modern Cloudberry and Greenplum backups. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org For additional commands, e-mail: commits-h...@cloudberry.apache.org