-
Notifications
You must be signed in to change notification settings - Fork 193
Feature: Add diskquota extension to gpcontrib #1490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tuhaihe
wants to merge
5
commits into
apache:main
Choose a base branch
from
tuhaihe:add-diskquota
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import the diskquota extension source code from the archived Greenplum repository. The upstream repository is archived and no longer maintained. This migration moves the code into the Apache Cloudberry codebase under `gpcontrib` directory to ensure continued maintenance and future adaptation for Apache Cloudberry. Source: https://github.com/greenplum-db/diskquota-archive Commit: 467fcf68254f678e19aaacc4cac9d84146501148
Cleanup the invalid files after importing diskquota extension from upstream. The specific changes include: 1. Remove .github directory: The upstream GitHub Actions workflows are no longer applicable in the Cloudberry repository. 2. Remove .gitmessage, .editorconfig, .clang-format: Code style and commit templates should follow Cloudberry's main repository standards. 3. Remove SECURITY.md: Legacy security policy. 4. Remove concourse directory: Legacy CI scripts. This cleanup makes the extension structure cleaner and more consistent with other contrib modules.
20ba04c to
df94dd0
Compare
Integrate diskquota extension into Apache Cloudberry build system and
adapt the codebase for Cloudberry 2.0+ (PostgreSQL 14 based).
Main changes:
Build system integration:
* Add new Makefile for building with Cloudberry source tree
```
make
make install
make installcheck
make clean
```
* Update gpcontrib/Makefile to include diskquota in build and installcheck
* Simplify CMakeLists.txt by removing GP6 version conditionals
* Add PG_SRC_DIR availability check for isolation2 tests
Code modernization (remove GP6 compatibility code):
* Remove GP_VERSION_NUM < 70000 conditionals throughout codebase
* Replace deprecated APIs:
heap_open -> table_open,
heap_beginscan_catalog -> table_beginscan_catalog,
heap_endscan -> table_endscan, etc.
* Replace init_ps_display() with set_ps_display() for process status
* Replace StrNCpy() with snprintf() for safer string handling
* Remove WaitForBackgroundWorkerShutdown() polyfill (now in core)
* Remove MemoryAccounting_Reset() calls (removed in GP7+)
* Update tuple descriptor attribute access from pointer to direct access
Documentation:
* Rewrite README.md for Apache Cloudberry with updated build instructions
Other improvements:
* Update extension comment to be more descriptive
* Ensure postgres.h is included first in all source files
CI:
* add ic-diskquota to `build-cloudberry.yml` workflow
* For `build-deb-cloudberry.yml`, the installation and configure prefix
are not consisent, which results in the test error. Will add
ic-diskquota test back once updating the deb workflow.
See: https://lists.apache.org/thread/1zd80r1hvpwwh5fjd5yqgcc7sr4f27qr
Add diskquota extension license information to comply with Apache release requirements. Changes: - Add diskquota entry to top-level LICENSE file under Greenplum section - Create licenses/LICENSE-diskquota.txt with PostgreSQL License text - Add gpcontrib/diskquota/** to pom.xml excludes for apache-rat checks The diskquota extension is licensed under the PostgreSQL License, originally developed by Pivotal Software and VMware.
c916aae to
92de2e8
Compare
leborchuk
approved these changes
Dec 24, 2025
Contributor
leborchuk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked it on my development ubuntu installation, all simple tests works fine
Here the output from examples
postgres=# select * from diskquota.show_fast_schema_quota_view;
schema_name | schema_oid | quota_in_mb | nspsize_in_bytes
-------------+------------+-------------+------------------
s1 | 17157 | 1 | 98304
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions