Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
333 commits
Select commit Hold shift + click to select a range
f8f8a08
Fix testing failure. NFC.
higuoxing Nov 29, 2021
be0c971
Introduce isolation2 test framework to diskquota. (#92)
higuoxing Nov 29, 2021
8b260f1
Fix incorrect relation size for AO tables (#93)
xuebinsu Nov 30, 2021
0f8545d
Add cache to hold uncommitted relations (#91)
zhrt123 Dec 1, 2021
72e9431
fix bug: acquire shared lock when traversing relation_cache in remove…
zhrt123 Dec 1, 2021
2a780eb
drop table after testing relation_size() (#97)
zhrt123 Dec 1, 2021
bcd920d
Fix test case bug (#98)
zhrt123 Dec 1, 2021
099a4a0
Add support for dispatching blockmap to segment servers. (#89)
higuoxing Dec 2, 2021
a60fdc8
Fix incorrect JOIN condition in test_blackmap.sql (#101)
higuoxing Dec 6, 2021
6635f47
calculate table size for hard limit (#100)
zhrt123 Dec 7, 2021
e713572
Add support for adding uncommitted relations to blackmap. (#102)
higuoxing Dec 8, 2021
0c4da6c
Fix bug: calculate AO table size in CTAS (#105)
zhrt123 Dec 10, 2021
3bf77d5
Add support for dispatching blackmap to segments. (#104)
higuoxing Dec 13, 2021
dfbebb6
Ignore distribution notice in regression tests. (#106)
higuoxing Dec 13, 2021
c10a1f5
Trying to make concourse happy. (#108)
higuoxing Dec 15, 2021
cc5d9a0
Print the diff files when the tests failed. (#109)
higuoxing Dec 15, 2021
5c165ca
Fix flaky test cases. NFC. (#110)
higuoxing Dec 16, 2021
81e1556
Fix bug: table's relation_cache_entry is not be removed after vacuum …
zhrt123 Dec 20, 2021
6ee3cbb
Fix test case bug (#114)
zhrt123 Dec 21, 2021
7fe6f01
Fix bug: can not calculate the size of pg_aoblkdir_xxxx before `creat…
zhrt123 Dec 21, 2021
91ab8da
Add UDF to show worker status (#111)
xuebinsu Dec 22, 2021
ae85ddf
Wait until deleted tuples are dead before VACUUM (#118)
xuebinsu Jan 19, 2022
d04e5ef
Make altered relation's oid active when performing 'VACUUM FULL'. (#116)
higuoxing Jan 19, 2022
5ebc81d
Refactor pause() to skip refreshing quota (#119)
xuebinsu Jan 20, 2022
9b027b4
ci: create rhel8 release build. (#117)
Jan 24, 2022
fc216ff
set the scope of pause() to current database
Sasasu Jan 24, 2022
23472c4
cleanup header include
Sasasu Jan 25, 2022
21f3ec2
re-dispatch pause status
Sasasu Jan 26, 2022
1b2911b
allow to re-create extension
Sasasu Jan 26, 2022
88b14c2
use atomic on flag hardlimit_lock (#124)
Sasasu Jan 25, 2022
aebb21b
send a error if launcher crashed (#124)
Sasasu Jan 25, 2022
a7d371c
Pause before DROP EXTENSION (#121)
xuebinsu Jan 27, 2022
57c1cb4
add test case for pause hardlimit (#128)
Sasasu Jan 27, 2022
74ff561
Attempt to fix flaky test_primary_failure (#132)
beeender Feb 9, 2022
d08b887
ereportif uses the 1st param as the condition (#131)
beeender Feb 10, 2022
5a23be8
add diskquota.status() to show if hardlimit or softlimit enabled or not
Sasasu Jan 26, 2022
193e346
ci: fix flaky test
Sasasu Feb 15, 2022
c7a6255
Add timeout when waiting for workers (#130)
xuebinsu Feb 16, 2022
688fa9d
Add git commit message template (#141)
beeender Feb 17, 2022
0f052d5
Use guc for hardlimit (#142)
beeender Feb 18, 2022
78d72e4
be nice with scheduler when naptime = 0 (#120)
Sasasu Feb 21, 2022
0e2de7a
Create worker entry before starting worker (#144)
xuebinsu Feb 21, 2022
e4a19d7
Extend fetch_table_stat() to update db cache (#138)
xuebinsu Feb 21, 2022
88991b3
Use ytt to create pipelines (#143)
beeender Feb 21, 2022
9ca7194
Specify DISTRIBUTED BY when CREATE TABLE (#146)
xuebinsu Feb 21, 2022
0b00d79
Simplify the build script (#148)
beeender Feb 21, 2022
8861006
Revert greenplum-db/diskquota#138 (#150)
xuebinsu Feb 22, 2022
725d092
Add clang-format and editorconfig (#136)
beeender Feb 22, 2022
9684b63
Extend fetch_table_stat() to update db cache v2 (#151)
xuebinsu Feb 22, 2022
fac1476
Wait after CREATE EXTENSION (#152)
xuebinsu Feb 22, 2022
f5abb37
Run tests on all platforms for PR pipeline (#153)
beeender Feb 23, 2022
11a038a
Reset naptime when test finish (#147)
beeender Feb 23, 2022
3e4381a
Fix flaky test case in isolation2/test_relation_size.sql (#123)
higuoxing Feb 24, 2022
5838e5b
Set PR pending status when start (#157)
beeender Feb 24, 2022
36aafbd
Update CI README for PR trigger issue (#156)
beeender Feb 25, 2022
671d7ed
Make diskquota work for "pg_default" tablespace (#133)
liuxueyang Feb 25, 2022
1227dd2
build: use cmake as build system (#161)
Sasasu Feb 28, 2022
a24e56f
rename library file to diskquota-<major.minor>.so (#162)
Sasasu Mar 3, 2022
65ef6c8
Keep the 1.0 sql the same with 1.x branch (#163)
beeender Mar 3, 2022
7f3a2ae
Test when table is created before quota is set (#129)
xuebinsu Mar 4, 2022
e7fd9cd
Install the latest cmake on CI (#165)
beeender Mar 4, 2022
1bb54f9
dump cmake version to 3.18
Sasasu Mar 3, 2022
b993a45
fix case test_ctas_no_preload_lib
Sasasu Mar 4, 2022
2c86d63
Cache CMAKE_INSTALL_PREFIX (#171)
beeender Mar 7, 2022
30914f9
Fix empty quota view when no table (#167)
xuebinsu Mar 7, 2022
881e0f7
mc/cmake installcheck (#169)
beeender Mar 7, 2022
504cb95
Dispatch only once for all tables when init() (#107)
zhrt123 Mar 7, 2022
240a6b7
Pack the last released so in the pipeline (#172)
beeender Mar 8, 2022
283775f
add upgrade and downgrade test (#166)
Sasasu Mar 8, 2022
7c87d29
Fix gcc warning (#175)
beeender Mar 8, 2022
a22cab1
Remove Makefiles (#174)
beeender Mar 8, 2022
e5b71bd
cmake: also link RESULTS_DIR to working dir
Sasasu Mar 8, 2022
a044b52
show current binary and schema version
Sasasu Mar 7, 2022
2acd1cb
Upload every build to GCS and add build-info (#177)
beeender Mar 10, 2022
fd0b739
Use cmake way to add C macro defines (#178)
beeender Mar 11, 2022
6f9a1b0
ci: speed up the test
Sasasu Mar 11, 2022
e6256e7
Small tuning on logs (#154)
beeender Mar 11, 2022
7c15f82
Update gitignore (#180)
beeender Mar 11, 2022
ac93656
Add test cases for postmaster restart (#135)
beeender Mar 15, 2022
df2f7d7
Fix memory leak when refresh_blackmap() (#182)
xuebinsu Mar 16, 2022
0376758
Format the code and add clang-format to PR pipeline (#183)
beeender Mar 17, 2022
e3edb27
remove the in-logic version check.
Sasasu Mar 17, 2022
48c773d
ci: add upgrade version naming convention check
Sasasu Mar 16, 2022
8340d12
Support release build (#186)
beeender Mar 21, 2022
12a20fa
feat: github actions for clang-check ci (#185)
yihong0618 Mar 21, 2022
24bc5fe
Run same regress test multiple times (#188)
beeender Mar 21, 2022
b780ef0
slack-alert and PR pipeline fix (#187)
beeender Mar 22, 2022
850c6c4
Don't format errno as '%d' in error messages. (#190)
higuoxing Mar 23, 2022
a8def57
fix context corrupted when dirty data exist in pg_extension
Sasasu Mar 22, 2022
a21964c
Fix cmake build on Mac (#191)
beeender Mar 24, 2022
bb34e22
Bring tests back on CI (#193)
beeender Mar 30, 2022
423269b
Missing EmitErrorReport before FlushErrorState (#155)
beeender Mar 30, 2022
1d30b1e
Insert newline before `else` (#194)
liuxueyang Mar 31, 2022
439fee6
Add the ytt based release pipeline (#198)
beeender Apr 1, 2022
5a0f4f8
Use on/off in diskquota.status() (#200)
Sasasu Apr 1, 2022
d4fa85b
Update licenses (#195)
beeender Apr 6, 2022
28667dd
Use released gpdb instead of release candidate (#201)
beeender Apr 8, 2022
6e245b1
Fix tablespace per segment ratio (#199)
Apr 8, 2022
2533e46
Fix un-expected remove when two tablespace-quota has a same role or s…
liuxueyang Apr 13, 2022
a32b331
Wait next loop for bgworker to refresh before INSERT in testcase (#205)
liuxueyang Apr 13, 2022
5912e7d
Add UDF diskquota.show_segment_ratio_quota_view (#204)
Apr 13, 2022
8fef0af
clean blackmap after drop diskquota (#196)
Sasasu Apr 14, 2022
218ec93
Reset memory account to fix memory leak (#203)
xuebinsu Apr 14, 2022
0facdf5
fix test case for test_manytable (#197)
Sasasu Apr 14, 2022
d115c25
some fix for release CI (#206)
Sasasu Apr 16, 2022
c6671d2
Fix mistaken log statement (#207)
beeender Apr 18, 2022
6e0b32d
Fix flaky ctas_pause on release build (#210)
beeender Apr 19, 2022
91be66e
Reformat quota exceeded message (#209)
beeender Apr 19, 2022
7a2a665
Fix change tablespace test case (#213)
Apr 21, 2022
f1be960
Replace "black" with "reject" for clearity (#214)
xuebinsu Apr 22, 2022
7d4d66d
Reject set quota for system owner(#215)
Apr 25, 2022
3384abc
fix set quota with upper case object name
Sasasu Apr 18, 2022
ab7b65d
Hint message when launcher cannot be connected (#216)
beeender Apr 28, 2022
75adaec
SPI & entry clear in refresh_blackmap (#211)
beeender Apr 28, 2022
dc21e40
Minimize the risk of stale relfilenodes (#217)
xuebinsu Apr 29, 2022
46d44ef
Report error if diskquota is not ready (#218)
xuebinsu May 5, 2022
2cde5d8
Allow deleting quota for super user (#219)
May 6, 2022
d99c932
Release pipeline is publishing wrong intermediates (#221)
beeender May 30, 2022
d6d47b8
Bump version to 2.0.1 (#222)
beeender May 30, 2022
37a4caf
Compatible with ancient git (#223)
Sasasu May 31, 2022
76bbce4
Fix compiler version on concourse (#225)
beeender Jul 25, 2022
959e09f
[CI] Fetch secrets from vault. (#226)
higuoxing Aug 4, 2022
338f716
[cmake] Use C compiler to link the target. (#230)
higuoxing Aug 23, 2022
872b3fb
Scripts for new pipeline naming rules (#231)
beeender Aug 24, 2022
1f6a2e0
Log readiness message only once (#229)
xuebinsu Aug 25, 2022
c28180c
Fix flaky test due to slow worker startup (#232)
xuebinsu Aug 25, 2022
2ab5f1f
Downgrade severity of the readiness issue (#235)
xuebinsu Aug 31, 2022
ef56dda
Fix creating artifact (#234)
beeender Aug 31, 2022
082ac9a
Dynamic bgworker for diskquota extension
Sep 15, 2022
3d137c3
Fix the test failure on release pipeline
Sep 20, 2022
d4edeec
Move pr/merge pipeline to dev2 (#238)
beeender Sep 22, 2022
c37cfd3
Combine two object_access_hook into one (#220)
Sep 26, 2022
428bc31
Remove free writer gang in launcher (#233)
Oct 11, 2022
1be0858
Fix bug: diskquota quota usage doesn't include uncommitted table (#228)
zhrt123 Oct 18, 2022
b19cfb7
Fix flaky test (#240)
Oct 18, 2022
f45407a
Fix flaky test test_ctas_role (#242)
Oct 19, 2022
007df5d
Support at least 20000 tables for each database (#239)
zhrt123 Oct 20, 2022
e6e501e
Reduce MAX_TABLES to 200K. (#243)
zhrt123 Oct 24, 2022
5de75db
Fix test_rejectmap flaky test (#246)
Oct 28, 2022
95a6359
Add SECURITY.md
gp-releng Oct 28, 2022
55f73b6
Add SECURITY.md (#249)
gp-releng Nov 2, 2022
c5fe436
Rewrite the diskquota worker scheduler (#245)
Nov 8, 2022
c86825c
Remove PR pipeline base branch (#252)
beeender Nov 8, 2022
ff9ef1a
Fix bug: relation_cache cannot isolate table info for each database (…
zhrt123 Nov 14, 2022
05615f8
Fix flaky test (#250)
Nov 17, 2022
7dfca8c
Filter the useless relation type. (#254)
zhrt123 Nov 17, 2022
2798f93
Fix worker time out and diskquota.max_workers (#255)
Nov 18, 2022
23472fb
Fix flaky "database not found" (#256)
beeender Nov 18, 2022
3ee0fc3
Change the max value of diskquota.max_workers to 20 (#257)
Nov 21, 2022
6748837
Revert change of worker_schedule test becuase flaky test (#260)
Nov 21, 2022
96a23f4
Missing pause causes deadlock flaky (#258)
beeender Nov 21, 2022
81f9f77
Fix memory leak when database is not ready (#262)
Nov 24, 2022
30a0b4c
Change the default value of GUC to reduce default memory cost. (#266)
zhrt123 Dec 1, 2022
46b6151
Refactor TableSizeEntry to reduce memory usage. (#264)
zhrt123 Dec 2, 2022
ff39fff
Correct table_size_entry key (#268)
Dec 5, 2022
0834641
Add cmake opt DISKQUOTA_DDL_CHANGE_CHECK (#270)
beeender Dec 5, 2022
8c09af4
Fix regression caused by #264 (#272)
beeender Dec 5, 2022
6f933f9
Add a GUC `diskquota.max_table_segments`. (#271)
zhrt123 Dec 5, 2022
a689958
Enable tests (#274)
beeender Dec 6, 2022
73114d8
Optimize dispatching reject map to segments (#275)
Dec 8, 2022
8cbdeb6
Fix bug: rejectmap entries should not be removed by other databases. …
zhrt123 Dec 12, 2022
138f95a
Fix diskquota worker schedule bug (#280)
Dec 12, 2022
82fe751
Bump version to 2.1.1 (#283)
beeender Dec 13, 2022
b385672
Fix flaky test_fast_quota_view (#282)
beeender Dec 13, 2022
8040acf
Fix flaky isolation2 test. (#281)
higuoxing Dec 16, 2022
e095c69
Fix compilation to support gpdb7 (#285)
zhrt123 Jan 30, 2023
66d039e
Fix released tarball name. (#286)
higuoxing Jan 30, 2023
a331fd9
Add an option to control whether compile with fault injector. (#287)
higuoxing Jan 30, 2023
a9dfe96
Add judgement for fault injector. (#288)
zhrt123 Jan 30, 2023
bb05689
Revert "Add judgement for fault injector. (#288)" (#291)
higuoxing Jan 30, 2023
3429970
CI: Fix pipeline (#293)
zhrt123 Jan 31, 2023
10606b3
Format code by clang-format. (#296)
zhrt123 Feb 3, 2023
54a273e
Add command to compile isolation2. (#297)
zhrt123 Feb 3, 2023
fa269a3
Fix flaky test (#294)
zhrt123 Feb 3, 2023
9ae2e82
Fix flaky test test_rejectmap_mul_db (#295)
Feb 6, 2023
bfe7bad
Fix bug (#298)
zhrt123 Feb 7, 2023
ff57e49
Enable upgrade test for CI (#299)
zhrt123 Feb 8, 2023
b236793
Skip fault injector case for release build (#302)
beeender Feb 9, 2023
3283772
VAR replace for Regress.cmake and fix test_rejectmap (#304)
beeender Feb 15, 2023
ddeb628
Fix update test failures caused by segid diff (#305)
beeender Feb 16, 2023
b2b41a3
Replace relation_open/relation_close with RelationIdGetRelation/Relat…
zhrt123 Feb 16, 2023
d86ead2
Fix flaky test of test_rejectmap_mul_db (#301)
Feb 20, 2023
e56694f
Fix test_primary_failure test case (#303)
Feb 21, 2023
97f1f9b
Move files to src and control dirs. (#307)
zhrt123 Feb 22, 2023
a15244f
Fix gpdb release binary regex (#311)
beeender Mar 7, 2023
83a1554
Enable test_postmaster_restart (#309)
zhrt123 Mar 7, 2023
ea99897
Bump cmake min version to 3.20 (#313)
beeender Mar 16, 2023
a939bc0
Resource change for gpdb7 binary (#315)
beeender Mar 20, 2023
9df0f2e
Fix bug: bgworker enters infinite loop after receiving notices from Q…
zhrt123 Mar 27, 2023
edbfd5e
Ignore some hint/notice for GPDB7 (#328)
zhrt123 Apr 6, 2023
685b52d
fix flaky test: test_appendonly (#327)
zhrt123 Apr 6, 2023
e9cadf2
Add dbname to DiskQuotaWorkerEntry (#326)
zhrt123 Apr 6, 2023
e2ab156
Replace SPI_execute with SPI_cursor_fetch (#322)
zhrt123 Apr 6, 2023
4a73b19
Split update SQL statement for diskquota.table_size (#325)
zhrt123 Apr 10, 2023
2431a13
Update cmake version in README. (#331)
woblerr Apr 14, 2023
51a9038
Fix flaky test: test_appendonly (#333)
zhrt123 Apr 17, 2023
b952190
Skip refresh_disk_quota_model() when receiving a signal (#321)
zhrt123 Apr 26, 2023
e589152
Allocate more shared memory to quota_info (#334)
zhrt123 Apr 26, 2023
f41e75a
Enable stanby test for 6X_STABLE (#335)
zhrt123 Apr 26, 2023
5e4e123
Bump version to 2.2.1 (#336)
beeender Apr 27, 2023
8d2e825
Use install_gpdb_component in CI test (#337)
beeender Apr 27, 2023
d4ecc28
Fix compiler warnings. (#339)
higuoxing May 25, 2023
1111f71
Fix bug: diskquota.status() (#344)
zhrt123 Jun 26, 2023
58bb9e2
fix pipeline (#345)
zhrt123 Jun 26, 2023
c2686c9
Reduce the number of the log in bgworker. (#346)
zhrt123 Jun 27, 2023
0a837c8
Fix bug: lose monitored_dbid_cache after switching mirror (#342)
zhrt123 Jun 27, 2023
05da9d4
Enable continuous upgrade. (#340)
zhrt123 Jun 27, 2023
c81e696
Fix pipeline. (#349)
zhrt123 Jun 28, 2023
e3622e1
Fix upgrade version check (#347)
beeender Jun 28, 2023
974876d
Remove gp7 from pipeline (#350)
zhrt123 Jun 28, 2023
6001a05
Add alter extension upgrade test (#348)
beeender Jun 28, 2023
2aefa80
Add a sleep in alter_test.sh (#351)
zhrt123 Jun 29, 2023
86ff586
Update to 2.2.2 (#352)
zhrt123 Jun 29, 2023
f1ca0c5
Reduce the remain logs in bgworker. (#354)
zhrt123 Jul 3, 2023
2c086fc
Fix bug: bgworkers only print log once. (#356)
zhrt123 Jul 4, 2023
22c35b6
Update resources by using gp-extensions-ci subtree
liuxueyang Jul 4, 2023
dbd044f
Squashed 'concourse/lib/' content from commit d51adf5
liuxueyang Jul 5, 2023
6327f5e
Merge commit 'dbd044f46d7672331e19cbd6b95a6f8df67511af' as 'concourse…
liuxueyang Jul 5, 2023
bb840f5
Update resources by using gp-extensions-ci subtree (#357)
liuxueyang Jul 5, 2023
f9e940f
Disable forks for PR resource (#358)
beeender Jul 12, 2023
93b32c9
Release/gp7 2.2.2 (#361)
zhrt123 Jul 28, 2023
5aab83e
Update to 2.3.0 (#362)
zhrt123 Aug 24, 2023
13653b2
Enable gpactivatestandby test (#363)
zhrt123 Aug 24, 2023
c7acb6b
Add gpdb7 job back to pipeline. (#367)
zhrt123 Aug 24, 2023
7358d61
fix creating extension with global option appendonly=true. (#366)
zhrt123 Aug 25, 2023
3224bee
Fix continuous upgrade (#368)
zhrt123 Sep 8, 2023
7fa38c2
Add GUC diskquota.max_monitored_databases. (#369)
zhrt123 Sep 12, 2023
dfc94bf
Fix wrong test case (#374)
zhrt123 Sep 12, 2023
d302f16
Fix compilation issue caused by GP7 (#375)
zhrt123 Sep 12, 2023
547e5d1
Add GUC diskquota.max_quotas (#372)
zhrt123 Sep 13, 2023
e694129
Fix bug: the counter of quota_info_map works wrong (#378)
zhrt123 Sep 15, 2023
8210b78
Fix bug: diskquota stop working after removing any extension (#379)
zhrt123 Sep 19, 2023
57cd673
Disable flaky test (#384)
zhrt123 Oct 18, 2023
f8b665b
Disable test_worker_schedule_exception (#385)
zhrt123 Oct 18, 2023
fba3d06
Move concourse to gp-extension-ci repo (#383)
zhrt123 Oct 19, 2023
240ad95
Build diskquota for rocky9. (#386)
zhrt123 Oct 19, 2023
5afcda5
Fix flaky test test_relation_size. (#387)
zhrt123 Oct 19, 2023
a8c0bb3
Fix wrong test result on GP6. (#388)
zhrt123 Oct 19, 2023
dd1020a
Fix flaky test test_dbname_encoding (#389)
zhrt123 Oct 19, 2023
9f2b504
Refactor quota info map (#380)
zhrt123 Oct 20, 2023
ca15504
[CMake] Fix package name for Rocky9/RHEL9 (#391)
beeender Oct 20, 2023
49a9a2d
Rename diskquota.max_quotas to diskquota.max_quota_probe (#390)
zhrt123 Oct 22, 2023
9fd7a22
Fix wrong shmem allocation. (#401)
zhrt123 Nov 7, 2023
27be29f
Free tuple after use (#414)
Jan 10, 2024
1aa3798
fix: update acions (#417)
yihong0618 Jan 22, 2024
467fcf6
Invalidate diskquota.table_size entries during startup (#406)
RekGRpth Mar 7, 2024
0e653b5
Add 'gpcontrib/diskquota/' from commit '467fcf68254f678e19aaacc4cac9d…
tuhaihe Jan 26, 2026
c863c4f
Remove legacy CI and unused files from diskquota
tuhaihe Dec 9, 2025
fb654ea
Add diskquota support for Apache Cloudberry
tuhaihe Dec 9, 2025
de212a4
Doc: Add diskquota license for ASF compliance
tuhaihe Dec 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/build-cloudberry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ jobs:
"gpcontrib/gp_sparse_vector:installcheck",
"gpcontrib/gp_toolkit:installcheck"]
},
{"test":"ic-diskquota",
"make_configs":["gpcontrib/diskquota:installcheck"],
"shared_preload_libraries":"diskquota-2.3"
},
{"test":"ic-fixme",
"make_configs":["src/test/regress:installcheck-fixme"],
"enable_core_check":false
Expand Down Expand Up @@ -1265,7 +1269,15 @@ jobs:

{
chmod +x "${SRC_DIR}"/devops/build/automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh
if ! time su - gpadmin -c "cd ${SRC_DIR} && NUM_PRIMARY_MIRROR_PAIRS='${{ matrix.num_primary_mirror_pairs }}' SRC_DIR=${SRC_DIR} ${SRC_DIR}/devops/build/automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh"; then

# Build BLDWRAP_POSTGRES_CONF_ADDONS for shared_preload_libraries if specified
EXTRA_CONF=""
if [[ -n "${{ matrix.shared_preload_libraries }}" ]]; then
EXTRA_CONF="shared_preload_libraries='${{ matrix.shared_preload_libraries }}'"
echo "Adding shared_preload_libraries: ${{ matrix.shared_preload_libraries }}"
fi

if ! time su - gpadmin -c "cd ${SRC_DIR} && NUM_PRIMARY_MIRROR_PAIRS='${{ matrix.num_primary_mirror_pairs }}' BLDWRAP_POSTGRES_CONF_ADDONS=\"${EXTRA_CONF}\" SRC_DIR=${SRC_DIR} ${SRC_DIR}/devops/build/automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh"; then
echo "::error::Demo cluster creation failed"
exit 1
fi
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/build-deb-cloudberry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,15 @@ jobs:

{
chmod +x "${SRC_DIR}"/devops/build/automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh
if ! time su - gpadmin -c "cd ${SRC_DIR} && NUM_PRIMARY_MIRROR_PAIRS='${{ matrix.num_primary_mirror_pairs }}' SRC_DIR=${SRC_DIR} ${SRC_DIR}/devops/build/automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh"; then

# Build BLDWRAP_POSTGRES_CONF_ADDONS for shared_preload_libraries if specified
EXTRA_CONF=""
if [[ -n "${{ matrix.shared_preload_libraries }}" ]]; then
EXTRA_CONF="shared_preload_libraries='${{ matrix.shared_preload_libraries }}'"
echo "Adding shared_preload_libraries: ${{ matrix.shared_preload_libraries }}"
fi

if ! time su - gpadmin -c "cd ${SRC_DIR} && NUM_PRIMARY_MIRROR_PAIRS='${{ matrix.num_primary_mirror_pairs }}' BLDWRAP_POSTGRES_CONF_ADDONS=\"${EXTRA_CONF}\" SRC_DIR=${SRC_DIR} ${SRC_DIR}/devops/build/automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh"; then
echo "::error::Demo cluster creation failed"
exit 1
fi
Expand Down
8 changes: 7 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,18 @@ The Greenplum Database software includes:
gpcontrib/orafce/*
see licenses/LICENSE-orafce.txt

----------------------------
----------------------------
BSD 3 Clause License

gpcontrib/gpcloud/test/googletest
see licenses/LICENSE-googletest.txt

----------------------------
PostgreSQL License

gpcontrib/diskquota/*
see licenses/LICENSE-diskquota.txt

================================================================================
Apache Cloudberry includes codes from

Expand Down
7 changes: 5 additions & 2 deletions gpcontrib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ ifeq "$(enable_debug_extensions)" "yes"
gp_legacy_string_agg \
gp_replica_check \
gp_toolkit \
pg_hint_plan
pg_hint_plan \
diskquota
else
recurse_targets = gp_sparse_vector \
gp_distribution_policy \
gp_internal_tools \
gp_legacy_string_agg \
gp_exttable_fdw \
gp_toolkit \
pg_hint_plan
pg_hint_plan \
diskquota
endif

ifeq "$(with_zstd)" "yes"
Expand Down Expand Up @@ -97,3 +99,4 @@ installcheck:
$(MAKE) -C gp_sparse_vector installcheck
$(MAKE) -C gp_toolkit installcheck
$(MAKE) -C gp_exttable_fdw installcheck
$(MAKE) -C diskquota installcheck
13 changes: 13 additions & 0 deletions gpcontrib/diskquota/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Build directory
build*/

# The tests results
results/

# For IDE/Editors
.vscode
.idea
tags
cscope*
.ccls-cache/
compile_commands.json
178 changes: 178 additions & 0 deletions gpcontrib/diskquota/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
cmake_minimum_required(VERSION 3.20)
# cmake_path requires 3.20

project(diskquota)

if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to 'Debug' as none was specified.")
set(CMAKE_BUILD_TYPE "Debug" CACHE
STRING "Choose the type of build." FORCE)
endif()

# generate 'compile_commands.json'
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# Retrieve repository information
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Git.cmake)
GitHash_Get(DISKQUOTA_GIT_HASH)

include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Gpdb.cmake)


# set include directories for all sub-projects
include_directories(${PG_INCLUDE_DIR_SERVER})
include_directories(${PG_INCLUDE_DIR}) # for libpq
# For in-tree builds, libpq headers are in a separate directory
if(PG_INCLUDE_DIR_LIBPQ)
include_directories(${PG_INCLUDE_DIR_LIBPQ})
endif()
# Overwrite the default build type flags set by cmake.
# We don't want the '-O3 -DNDEBUG' from cmake. Instead, those will be set by the CFLAGS from pg_config.
# And, the good news is, GPDB release always have '-g'.
set(CMAKE_C_FLAGS_RELEASE "" CACHE
STRING "Flags for RELEASE build" FORCE)
set(CMAKE_C_FLAGS_DEBUG "-DDISKQUOTA_DEBUG"
CACHE STRING "Flags for DEBUG build" FORCE)
# set link flags for all sub-projects
set(CMAKE_MODULE_LINKER_FLAGS "${PG_LD_FLAGS}")
if (APPLE)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -bundle_loader ${PG_BIN_DIR}/postgres")
endif()
# set c and ld flags for all projects
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PG_C_FLAGS}")

# generate version
if(NOT DEFINED DISKQUOTA_VERSION)
file(STRINGS VERSION DISKQUOTA_VERSION)
endif()

string(REGEX REPLACE "^([0-9]+).[0-9]+.[0-9]+$" "\\1" DISKQUOTA_MAJOR_VERSION
${DISKQUOTA_VERSION})
string(REGEX REPLACE "^[0-9]+.([0-9]+).[0-9]+$" "\\1" DISKQUOTA_MINOR_VERSION
${DISKQUOTA_VERSION})
string(REGEX REPLACE "^[0-9]+.[0-9]+.([0-9]+)$" "\\1" DISKQUOTA_PATCH_VERSION
${DISKQUOTA_VERSION})

if("${DISKQUOTA_MAJOR_VERSION}.${DISKQUOTA_MINOR_VERSION}" STREQUAL "1.0")
# in special, version 1.0.x do not has suffix
set(DISKQUOTA_BINARY_NAME "diskquota")
else()
set(DISKQUOTA_BINARY_NAME
"diskquota-${DISKQUOTA_MAJOR_VERSION}.${DISKQUOTA_MINOR_VERSION}")
endif()

add_compile_definitions(
DISKQUOTA_VERSION="${DISKQUOTA_VERSION}"
DISKQUOTA_MAJOR_VERSION=${DISKQUOTA_MAJOR_VERSION}
DISKQUOTA_MINOR_VERSION=${DISKQUOTA_MINOR_VERSION}
DISKQUOTA_PATCH_VERSION=${DISKQUOTA_PATCH_VERSION}
DISKQUOTA_BINARY_NAME="${DISKQUOTA_BINARY_NAME}")

set(SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src")
file(GLOB diskquota_SRC "${SRC_DIR}/*.c")

set(DISKQUOTA_DDL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/control/ddl")
file(GLOB diskquota_DDL "${DISKQUOTA_DDL_DIR}/*")

add_library(diskquota MODULE ${diskquota_SRC})

if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX
"${PG_HOME}"
CACHE PATH "default install prefix" FORCE)
endif()

set_target_properties(
diskquota
PROPERTIES OUTPUT_NAME ${DISKQUOTA_BINARY_NAME}
PREFIX ""
C_STANDARD 99
LINKER_LANGUAGE "C")

TARGET_LINK_LIBRARIES(diskquota ${PG_LIB_DIR}/libpq.so)

# packing part, move to a separate file if this part is too large
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Distro.cmake)

if(DEFINED DISKQUOTA_LAST_RELEASE_PATH)
message(STATUS "Copy pervious installer from ${DISKQUOTA_LAST_RELEASE_PATH}")
file(ARCHIVE_EXTRACT INPUT ${DISKQUOTA_LAST_RELEASE_PATH} PATTERNS "*.so")
file(GLOB so_files_list
"${CMAKE_BINARY_DIR}/lib/postgresql/*.so")

foreach(so_path IN LISTS so_files_list)
get_filename_component(so_name ${so_path} NAME_WLE)
# Replace 'diskquota-x.y' with 'x.y'. 'diskquota' won't be replaced, which belongs to 1.x release.
string(REPLACE "diskquota-" "" so_ver ${so_name})
# Install the previous so files. Those so files have versions less than current version.
# diskqutoa.so doesn't have version string in the file name. It belongs to 1.x release.
if((${so_ver} STREQUAL "diskquota") OR
${so_ver} VERSION_LESS ${DISKQUOTA_MAJOR_VERSION}.${DISKQUOTA_MINOR_VERSION})
list(APPEND DISKQUOTA_PREVIOUS_LIBRARY ${so_path})
endif()
endforeach()

install(PROGRAMS ${DISKQUOTA_PREVIOUS_LIBRARY} DESTINATION "lib/postgresql/")

get_filename_component(
DISKQUOTA_LAST_RELEASE_FILENAME ${DISKQUOTA_LAST_RELEASE_PATH} NAME CACHE
"last release installer name")
string(
REGEX
REPLACE "^diskquota-([0-9]+).[0-9]+.[0-9]+-.*$" "\\1"
DISKQUOTA_LAST_MAJOR_VERSION ${DISKQUOTA_LAST_RELEASE_FILENAME})
string(
REGEX
REPLACE "^diskquota-[0-9]+.([0-9]+).[0-9]+-.*$" "\\1"
DISKQUOTA_LAST_MINOR_VERSION ${DISKQUOTA_LAST_RELEASE_FILENAME})
string(
REGEX
REPLACE "^diskquota-[0-9]+.[0-9]+.([0-9]+)-.*$" "\\1"
DISKQUOTA_LAST_PATCH_VERSION ${DISKQUOTA_LAST_RELEASE_FILENAME})

set(DISKQUOTA_LAST_VERSION
"${DISKQUOTA_LAST_MAJOR_VERSION}.${DISKQUOTA_LAST_MINOR_VERSION}.${DISKQUOTA_LAST_PATCH_VERSION}"
)
endif()

set(tgz_NAME
"diskquota-${DISKQUOTA_MAJOR_VERSION}.${DISKQUOTA_MINOR_VERSION}.${DISKQUOTA_PATCH_VERSION}-${DISTRO_NAME}_x86_64"
)
set(CPACK_GENERATOR "TGZ")
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
set(CPACK_PACKAGE_FILE_NAME ${tgz_NAME})
include(CPack)
# create_artifact target is used to tar the package with version into a version-less tarball to be
# used on concourse gcs resource. It will be uploaded to a gcs version file (no diskquota version
# string in the file name), and be retrieved in the release step. Then we don't have to firgure out
# a way to add the version string back to the release file name, just untar it.
set(artifact_NAME "diskquota.tar.gz")
add_custom_target(create_artifact
COMMAND
${CMAKE_COMMAND} --build . --target package
COMMAND
${CMAKE_COMMAND} -E tar czvf ${artifact_NAME} "${tgz_NAME}.tar.gz")
# packing end

# Create build-info
# The diskquota-build-info shouldn't be copied to GPDB release by install_gpdb_component
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/BuildInfo.cmake)
set(build_info_PATH ${CMAKE_CURRENT_BINARY_DIR}/diskquota-build-info)
BuildInfo_Create(${build_info_PATH}
VARS
DISKQUOTA_GIT_HASH
DISKQUOTA_VERSION
GP_MAJOR_VERSION
GP_VERSION
CMAKE_BUILD_TYPE)
# Create build-info end

# Add installcheck targets
add_subdirectory(tests)
add_subdirectory(upgrade_test)

# NOTE: keep install part at the end of file, to overwrite previous binary
install(PROGRAMS "cmake/install_gpdb_component" DESTINATION ".")
install(FILES ${diskquota_DDL} DESTINATION "share/postgresql/extension/")
install(TARGETS diskquota DESTINATION "lib/postgresql/")
install(FILES ${build_info_PATH} DESTINATION ".")
31 changes: 31 additions & 0 deletions gpcontrib/diskquota/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Copyright (c) 2004-2020 Pivotal Software, Inc.
Copyright (c) 2020-Present VMware, Inc. or its affiliates

diskquota is licensed under the PostgreSQL license, the same license
as PostgreSQL. It contains parts of PostgreSQL source code. A copy of
the license is below:

--------------
PostgreSQL Database Management System
(formerly known as Postgres, then as Postgres95)

Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group

Portions Copyright (c) 1994, The Regents of the University of California

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written agreement
is hereby granted, provided that the above copyright notice and this
paragraph and the following two paragraphs appear in all copies.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
76 changes: 76 additions & 0 deletions gpcontrib/diskquota/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Makefile for diskquota extension
#
# This Makefile wraps the CMake build system for integration with
# the Cloudberry build process.
#
# Usage:
# make # build the extension
# make install # install the extension
# make installcheck # run regression tests
# make clean # clean build artifacts

ifdef USE_PGXS
# Standalone build: pg_config must be in PATH
PG_CONFIG_ABS := $(shell which pg_config)
PG_PREFIX := $(shell $(PG_CONFIG_ABS) --prefix)
CMAKE_OPTS := -DPG_CONFIG=$(PG_CONFIG_ABS)
else
# In-tree build
subdir = gpcontrib/diskquota
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
# Get absolute source directory path
PG_SRC_DIR_ABS := $(shell cd $(top_builddir) && pwd)
PG_CONFIG_ABS := $(PG_SRC_DIR_ABS)/src/bin/pg_config/pg_config
PG_PREFIX := $(prefix)
# Pass PG_SRC_DIR to CMake so it doesn't try to derive it from pg_config
CMAKE_OPTS := -DPG_CONFIG=$(PG_CONFIG_ABS) -DPG_SRC_DIR=$(PG_SRC_DIR_ABS)
endif

.PHONY: all
all: build

.PHONY: build
build:
@echo "Building diskquota with CMake..."
@if [ ! -f build/Makefile ]; then \
mkdir -p build && \
cd build && \
cmake $(CMAKE_OPTS) -DCMAKE_INSTALL_PREFIX=$(DESTDIR)$(PG_PREFIX) .. ; \
fi
cd build && $(MAKE)

.PHONY: install
install: build
cd build && $(MAKE) install

.PHONY: installcheck
installcheck:
@echo "Running diskquota regression tests..."
@if [ ! -f build/Makefile ]; then \
mkdir -p build && \
cd build && \
cmake $(CMAKE_OPTS) -DCMAKE_INSTALL_PREFIX=$(DESTDIR)$(PG_PREFIX) .. ; \
fi
cd build && $(MAKE) installcheck

.PHONY: clean
clean:
rm -rf build
Loading
Loading