Vlasdislav opened a new pull request, #1757: URL: https://github.com/apache/cloudberry/pull/1757
### What does this PR do? This PR ports the `gp_relsizes_stats` extension from the standalone [open-gpdb/gp_relsizes_stats](https://github.com/open-gpdb/gp_relsizes_stats) repository into the Cloudberry monorepo under `gpcontrib/`. The extension collects and stores statistics about table and file sizes on master and segment hosts. It supports automatic collection via a Background Worker and manual one-shot collection via `relsizes_stats_schema.relsizes_collect_stats_once()`. **Changes made during porting:** - **`Makefile`** — added dual-mode build support: `USE_PGXS=1` for standalone builds (original behavior) and in-tree build via `$(top_builddir)/src/Makefile.global` + `contrib-global.mk` for building inside the Cloudberry source tree - **`gpcontrib/Makefile`** — added `gp_relsizes_stats` to `recurse_targets` for both release and debug (`enable_debug_extensions=yes`) build configurations - **`README.md`** — Updated - **`rebuild_in_docker.sh`** — updated default `PG_CONFIG` path from Greenplum to Cloudberry (`/usr/local/cloudberry-db/bin/pg_config`) and updated default container directory path accordingly ### Type of Change - [ ] Bug fix (non-breaking change) - [x] New feature (non-breaking change) - [ ] Breaking change (fix or feature with breaking changes) - [x] Documentation update ### Breaking Changes Not applicable. ### Test Plan - [] Integration tests added/updated — regression tests in `test/sql/gp_relsizes_stats.sql` and `test/sql/grants.sql` are included from the upstream repository - [ ] Passed `make installcheck` - [ ] Passed `make -C src/test installcheck-cbdb-parallel` ### Impact **Performance:** No impact on existing functionality. The background worker is disabled by default (`gp_relsizes_stats.enabled = false`). **User-facing changes:** New extension `gp_relsizes_stats` available in `gpcontrib`. Must be added to `shared_preload_libraries` to enable the background worker. **Dependencies:** None. Uses standard PostgreSQL/Cloudberry APIs only. ### Checklist - [x] Followed [contribution guide](https://cloudberry.apache.org/contribute/code) - [x] Added/updated documentation - [x] Reviewed code for security implications - [ ] Requested review from [cloudberry committers](https://github.com/orgs/apache/teams/cloudberry-committers) ### Additional Context Upstream repository: https://github.com/open-gpdb/gp_relsizes_stats -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
