fix(cluster): add database type check for legacy GPDB query (#12)

When retrieving the segment configuration, there is special query
logic for GreenplumDB (GPDB) versions prior to "6".

The previous implementation only checked the version number. This could
cause an incorrect query to be executed on a non-GPDB database
(like CloudberryDB) that might also satisfy the `Before("6")` version
check.

This commit adds an `IsGPDB()` check to ensure this legacy logic is
triggered only when connected to the correct database type, making
the function more robust.
1 file changed
tree: 368942660323e6569096e615a6b5877d1d1bbcaf
  1. .github/
  2. ci/
  3. cluster/
  4. conv/
  5. dbconn/
  6. gperror/
  7. gplog/
  8. iohelper/
  9. operating/
  10. structmatcher/
  11. testhelper/
  12. .asf.yaml
  13. .gitignore
  14. .golangci.yml
  15. CODE_OF_CONDUCT.md
  16. CONTRIBUTING.md
  17. go.mod
  18. go.sum
  19. LICENSE
  20. Makefile
  21. NOTICE
  22. README.md
  23. SECURITY.md
  24. show_coverage.sh
README.md

go-libs for Apache Cloudberry (Incubating)

Slack Twitter Follow Website


This project is a fork of the Greenplum gp-common-go-libs, which is a dependency for the gpbackup utility in Cloudberry.

Please note that this repository is only maintained for Cloudberry 1.0 and its later versions.

License

Licensed under Apache License Version 2.0. For more details, please refer to the LICENSE.

Acknowledgment

Thanks to all the gp-common-go-libs contributors, more details in its GitHub page.