Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
327 commits
Select commit Hold shift + click to select a range
8e1f8d2
Create database 'diskquota' before running regression tests. (#75)
higuoxing Oct 14, 2021
8a36b27
Add RFC for hard limit (#76)
xuebinsu Nov 4, 2021
302b0ce
Fix stack full issue when flush to table_size (#81)
xuebinsu Nov 12, 2021
d4395a1
Improve error handling in diskquota_fetch_table_stat(). (#82)
higuoxing Nov 19, 2021
7d960d9
Add test case for appendonly relations. (#85)
higuoxing Nov 23, 2021
741715d
Support calculate relation size by relfilenode (#87)
zhrt123 Nov 25, 2021
321227f
Fix testing failure. NFC.
higuoxing Nov 29, 2021
fb9e362
Introduce isolation2 test framework to diskquota. (#92)
higuoxing Nov 29, 2021
ccd2955
Fix incorrect relation size for AO tables (#93)
xuebinsu Nov 30, 2021
c8def2d
Add cache to hold uncommitted relations (#91)
zhrt123 Dec 1, 2021
631f673
fix bug: acquire shared lock when traversing relation_cache in remove…
zhrt123 Dec 1, 2021
a9723e9
drop table after testing relation_size() (#97)
zhrt123 Dec 1, 2021
520fcd1
Fix test case bug (#98)
zhrt123 Dec 1, 2021
4124dc0
Add support for dispatching blockmap to segment servers. (#89)
higuoxing Dec 2, 2021
4eb7c3a
Fix incorrect JOIN condition in test_blackmap.sql (#101)
higuoxing Dec 6, 2021
b57fbf6
calculate table size for hard limit (#100)
zhrt123 Dec 7, 2021
992cdaa
Add support for adding uncommitted relations to blackmap. (#102)
higuoxing Dec 8, 2021
a86c2d3
Fix bug: calculate AO table size in CTAS (#105)
zhrt123 Dec 10, 2021
d464ad8
Add support for dispatching blackmap to segments. (#104)
higuoxing Dec 13, 2021
8fe310c
Ignore distribution notice in regression tests. (#106)
higuoxing Dec 13, 2021
71a3ce4
Trying to make concourse happy. (#108)
higuoxing Dec 15, 2021
0b45cff
Print the diff files when the tests failed. (#109)
higuoxing Dec 15, 2021
196fb4c
Fix flaky test cases. NFC. (#110)
higuoxing Dec 16, 2021
ff47b1e
Fix bug: table's relation_cache_entry is not be removed after vacuum …
zhrt123 Dec 20, 2021
3c3a6fd
Fix test case bug (#114)
zhrt123 Dec 21, 2021
ada901c
Fix bug: can not calculate the size of pg_aoblkdir_xxxx before `creat…
zhrt123 Dec 21, 2021
9786cd3
Add UDF to show worker status (#111)
xuebinsu Dec 22, 2021
c0b6c67
Wait until deleted tuples are dead before VACUUM (#118)
xuebinsu Jan 19, 2022
6ea4485
Make altered relation's oid active when performing 'VACUUM FULL'. (#116)
higuoxing Jan 19, 2022
415d16a
Refactor pause() to skip refreshing quota (#119)
xuebinsu Jan 20, 2022
96e272a
ci: create rhel8 release build. (#117)
Jan 24, 2022
ac514c0
set the scope of pause() to current database
Sasasu Jan 24, 2022
bfe30e9
cleanup header include
Sasasu Jan 25, 2022
23640bf
re-dispatch pause status
Sasasu Jan 26, 2022
fd30e34
allow to re-create extension
Sasasu Jan 26, 2022
11c2eb9
use atomic on flag hardlimit_lock (#124)
Sasasu Jan 25, 2022
689ce96
send a error if launcher crashed (#124)
Sasasu Jan 25, 2022
5a47086
Pause before DROP EXTENSION (#121)
xuebinsu Jan 27, 2022
f98478a
add test case for pause hardlimit (#128)
Sasasu Jan 27, 2022
483451a
Attempt to fix flaky test_primary_failure (#132)
beeender Feb 9, 2022
262b34e
ereportif uses the 1st param as the condition (#131)
beeender Feb 10, 2022
3bf0328
add diskquota.status() to show if hardlimit or softlimit enabled or not
Sasasu Jan 26, 2022
67a4be7
ci: fix flaky test
Sasasu Feb 15, 2022
d9f1a1a
Add timeout when waiting for workers (#130)
xuebinsu Feb 16, 2022
ac7e1d9
Add git commit message template (#141)
beeender Feb 17, 2022
81e7fe2
Use guc for hardlimit (#142)
beeender Feb 18, 2022
469fc0d
be nice with scheduler when naptime = 0 (#120)
Sasasu Feb 21, 2022
aba3df8
Create worker entry before starting worker (#144)
xuebinsu Feb 21, 2022
37ff249
Extend fetch_table_stat() to update db cache (#138)
xuebinsu Feb 21, 2022
dae6baf
Use ytt to create pipelines (#143)
beeender Feb 21, 2022
136394e
Specify DISTRIBUTED BY when CREATE TABLE (#146)
xuebinsu Feb 21, 2022
42ce8e3
Simplify the build script (#148)
beeender Feb 21, 2022
1f4f63d
Revert greenplum-db/diskquota#138 (#150)
xuebinsu Feb 22, 2022
1941096
Add clang-format and editorconfig (#136)
beeender Feb 22, 2022
0b72326
Extend fetch_table_stat() to update db cache v2 (#151)
xuebinsu Feb 22, 2022
8c961de
Wait after CREATE EXTENSION (#152)
xuebinsu Feb 22, 2022
4eefed5
Run tests on all platforms for PR pipeline (#153)
beeender Feb 23, 2022
d5530b1
Reset naptime when test finish (#147)
beeender Feb 23, 2022
76e425f
Fix flaky test case in isolation2/test_relation_size.sql (#123)
higuoxing Feb 24, 2022
70f1071
Set PR pending status when start (#157)
beeender Feb 24, 2022
27fbb45
Update CI README for PR trigger issue (#156)
beeender Feb 25, 2022
5a070bd
Make diskquota work for "pg_default" tablespace (#133)
liuxueyang Feb 25, 2022
602d039
build: use cmake as build system (#161)
Sasasu Feb 28, 2022
fd5efbb
rename library file to diskquota-<major.minor>.so (#162)
Sasasu Mar 3, 2022
3c4c1da
Keep the 1.0 sql the same with 1.x branch (#163)
beeender Mar 3, 2022
aa28e06
Test when table is created before quota is set (#129)
xuebinsu Mar 4, 2022
b131bf4
Install the latest cmake on CI (#165)
beeender Mar 4, 2022
a82c776
dump cmake version to 3.18
Sasasu Mar 3, 2022
f13327e
fix case test_ctas_no_preload_lib
Sasasu Mar 4, 2022
52ccab0
Cache CMAKE_INSTALL_PREFIX (#171)
beeender Mar 7, 2022
d4fc0d2
Fix empty quota view when no table (#167)
xuebinsu Mar 7, 2022
09f6a66
mc/cmake installcheck (#169)
beeender Mar 7, 2022
982c125
Dispatch only once for all tables when init() (#107)
zhrt123 Mar 7, 2022
0b19e94
Pack the last released so in the pipeline (#172)
beeender Mar 8, 2022
91b65e1
add upgrade and downgrade test (#166)
Sasasu Mar 8, 2022
1e970a8
Fix gcc warning (#175)
beeender Mar 8, 2022
14b8bf6
Remove Makefiles (#174)
beeender Mar 8, 2022
716d072
cmake: also link RESULTS_DIR to working dir
Sasasu Mar 8, 2022
2fc8b9a
show current binary and schema version
Sasasu Mar 7, 2022
bf7ae4f
Upload every build to GCS and add build-info (#177)
beeender Mar 10, 2022
17f4a41
Use cmake way to add C macro defines (#178)
beeender Mar 11, 2022
c4acd2f
ci: speed up the test
Sasasu Mar 11, 2022
1be6e75
Small tuning on logs (#154)
beeender Mar 11, 2022
3780e8f
Update gitignore (#180)
beeender Mar 11, 2022
ff2939c
Add test cases for postmaster restart (#135)
beeender Mar 15, 2022
38bf32e
Fix memory leak when refresh_blackmap() (#182)
xuebinsu Mar 16, 2022
bc8940e
Format the code and add clang-format to PR pipeline (#183)
beeender Mar 17, 2022
6bc5590
remove the in-logic version check.
Sasasu Mar 17, 2022
2b65dcf
ci: add upgrade version naming convention check
Sasasu Mar 16, 2022
e65d624
Support release build (#186)
beeender Mar 21, 2022
9e526c2
feat: github actions for clang-check ci (#185)
yihong0618 Mar 21, 2022
6d3edc8
Run same regress test multiple times (#188)
beeender Mar 21, 2022
2e80f83
slack-alert and PR pipeline fix (#187)
beeender Mar 22, 2022
e29d43f
Don't format errno as '%d' in error messages. (#190)
higuoxing Mar 23, 2022
8408c15
fix context corrupted when dirty data exist in pg_extension
Sasasu Mar 22, 2022
fcd1793
Fix cmake build on Mac (#191)
beeender Mar 24, 2022
734be7a
Bring tests back on CI (#193)
beeender Mar 30, 2022
a17f368
Missing EmitErrorReport before FlushErrorState (#155)
beeender Mar 30, 2022
d483318
Insert newline before `else` (#194)
liuxueyang Mar 31, 2022
e72e8d1
Add the ytt based release pipeline (#198)
beeender Apr 1, 2022
8ac5551
Use on/off in diskquota.status() (#200)
Sasasu Apr 1, 2022
a9fe5c2
Update licenses (#195)
beeender Apr 6, 2022
cb4b6a7
Use released gpdb instead of release candidate (#201)
beeender Apr 8, 2022
b958a44
Fix tablespace per segment ratio (#199)
Apr 8, 2022
f46a345
Fix un-expected remove when two tablespace-quota has a same role or s…
liuxueyang Apr 13, 2022
4d36bfd
Wait next loop for bgworker to refresh before INSERT in testcase (#205)
liuxueyang Apr 13, 2022
9249306
Add UDF diskquota.show_segment_ratio_quota_view (#204)
Apr 13, 2022
dbc3ec5
clean blackmap after drop diskquota (#196)
Sasasu Apr 14, 2022
97e1b2c
Reset memory account to fix memory leak (#203)
xuebinsu Apr 14, 2022
4894e9d
fix test case for test_manytable (#197)
Sasasu Apr 14, 2022
73e8472
some fix for release CI (#206)
Sasasu Apr 16, 2022
03d67ce
Fix mistaken log statement (#207)
beeender Apr 18, 2022
b81f66e
Fix flaky ctas_pause on release build (#210)
beeender Apr 19, 2022
fa7f20c
Reformat quota exceeded message (#209)
beeender Apr 19, 2022
7260256
Fix change tablespace test case (#213)
Apr 21, 2022
edb236d
Replace "black" with "reject" for clearity (#214)
xuebinsu Apr 22, 2022
be84726
Reject set quota for system owner(#215)
Apr 25, 2022
d17f2d9
fix set quota with upper case object name
Sasasu Apr 18, 2022
0cf778c
Hint message when launcher cannot be connected (#216)
beeender Apr 28, 2022
1b73089
SPI & entry clear in refresh_blackmap (#211)
beeender Apr 28, 2022
99bd99c
Minimize the risk of stale relfilenodes (#217)
xuebinsu Apr 29, 2022
9855b3d
Report error if diskquota is not ready (#218)
xuebinsu May 5, 2022
dae8278
Allow deleting quota for super user (#219)
May 6, 2022
7f7c79b
Release pipeline is publishing wrong intermediates (#221)
beeender May 30, 2022
bdf1dd3
Bump version to 2.0.1 (#222)
beeender May 30, 2022
2178a15
Compatible with ancient git (#223)
Sasasu May 31, 2022
7904b34
Fix compiler version on concourse (#225)
beeender Jul 25, 2022
cd8f47f
[CI] Fetch secrets from vault. (#226)
higuoxing Aug 4, 2022
e2af12e
[cmake] Use C compiler to link the target. (#230)
higuoxing Aug 23, 2022
5c3c1c7
Scripts for new pipeline naming rules (#231)
beeender Aug 24, 2022
7432edf
Log readiness message only once (#229)
xuebinsu Aug 25, 2022
34a4dbe
Fix flaky test due to slow worker startup (#232)
xuebinsu Aug 25, 2022
861bf0b
Downgrade severity of the readiness issue (#235)
xuebinsu Aug 31, 2022
c86a30e
Fix creating artifact (#234)
beeender Aug 31, 2022
7378137
Dynamic bgworker for diskquota extension
Sep 15, 2022
40e54fb
Fix the test failure on release pipeline
Sep 20, 2022
b961dd4
Move pr/merge pipeline to dev2 (#238)
beeender Sep 22, 2022
5bbd552
Combine two object_access_hook into one (#220)
Sep 26, 2022
c0cb4ce
Remove free writer gang in launcher (#233)
Oct 11, 2022
a54e837
Fix bug: diskquota quota usage doesn't include uncommitted table (#228)
zhrt123 Oct 18, 2022
80161a1
Fix flaky test (#240)
Oct 18, 2022
094eda4
Fix flaky test test_ctas_role (#242)
Oct 19, 2022
bb2705f
Support at least 20000 tables for each database (#239)
zhrt123 Oct 20, 2022
5e93819
Reduce MAX_TABLES to 200K. (#243)
zhrt123 Oct 24, 2022
7a0a455
Fix test_rejectmap flaky test (#246)
Oct 28, 2022
56e5649
Add SECURITY.md
gp-releng Oct 28, 2022
2cda683
Add SECURITY.md (#249)
gp-releng Nov 2, 2022
dd41a20
Rewrite the diskquota worker scheduler (#245)
Nov 8, 2022
b08f972
Remove PR pipeline base branch (#252)
beeender Nov 8, 2022
a814b19
Fix bug: relation_cache cannot isolate table info for each database (…
zhrt123 Nov 14, 2022
c1d61b0
Fix flaky test (#250)
Nov 17, 2022
190818b
Filter the useless relation type. (#254)
zhrt123 Nov 17, 2022
f2e4c71
Fix worker time out and diskquota.max_workers (#255)
Nov 18, 2022
60585c9
Fix flaky "database not found" (#256)
beeender Nov 18, 2022
44b8b97
Change the max value of diskquota.max_workers to 20 (#257)
Nov 21, 2022
49bac34
Revert change of worker_schedule test becuase flaky test (#260)
Nov 21, 2022
899c7ca
Missing pause causes deadlock flaky (#258)
beeender Nov 21, 2022
7830263
Fix memory leak when database is not ready (#262)
Nov 24, 2022
7b43f27
Change the default value of GUC to reduce default memory cost. (#266)
zhrt123 Dec 1, 2022
19372ca
Refactor TableSizeEntry to reduce memory usage. (#264)
zhrt123 Dec 2, 2022
0016359
Correct table_size_entry key (#268)
Dec 5, 2022
c8abdad
Add cmake opt DISKQUOTA_DDL_CHANGE_CHECK (#270)
beeender Dec 5, 2022
af5d066
Fix regression caused by #264 (#272)
beeender Dec 5, 2022
4905bf7
Add a GUC `diskquota.max_table_segments`. (#271)
zhrt123 Dec 5, 2022
becada8
Enable tests (#274)
beeender Dec 6, 2022
337dece
Optimize dispatching reject map to segments (#275)
Dec 8, 2022
3766901
Fix bug: rejectmap entries should not be removed by other databases. …
zhrt123 Dec 12, 2022
434b89b
Fix diskquota worker schedule bug (#280)
Dec 12, 2022
c4cfb59
Bump version to 2.1.1 (#283)
beeender Dec 13, 2022
e98d7f1
Fix flaky test_fast_quota_view (#282)
beeender Dec 13, 2022
9efd8b1
Fix flaky isolation2 test. (#281)
higuoxing Dec 16, 2022
ccb6e1e
Fix compilation to support gpdb7 (#285)
zhrt123 Jan 30, 2023
4aa82c8
Fix released tarball name. (#286)
higuoxing Jan 30, 2023
c1ac4b4
Add an option to control whether compile with fault injector. (#287)
higuoxing Jan 30, 2023
c0fb2e8
Add judgement for fault injector. (#288)
zhrt123 Jan 30, 2023
c1b72aa
Revert "Add judgement for fault injector. (#288)" (#291)
higuoxing Jan 30, 2023
b7881fc
CI: Fix pipeline (#293)
zhrt123 Jan 31, 2023
0fcf6f7
Format code by clang-format. (#296)
zhrt123 Feb 3, 2023
9477f29
Add command to compile isolation2. (#297)
zhrt123 Feb 3, 2023
06888c0
Fix flaky test (#294)
zhrt123 Feb 3, 2023
cc157db
Fix flaky test test_rejectmap_mul_db (#295)
Feb 6, 2023
76eb0b6
Fix bug (#298)
zhrt123 Feb 7, 2023
95f23a8
Enable upgrade test for CI (#299)
zhrt123 Feb 8, 2023
1d95f3e
Skip fault injector case for release build (#302)
beeender Feb 9, 2023
a6bd5a0
VAR replace for Regress.cmake and fix test_rejectmap (#304)
beeender Feb 15, 2023
136851a
Fix update test failures caused by segid diff (#305)
beeender Feb 16, 2023
68e1ecb
Replace relation_open/relation_close with RelationIdGetRelation/Relat…
zhrt123 Feb 16, 2023
1310e44
Fix flaky test of test_rejectmap_mul_db (#301)
Feb 20, 2023
dffc37f
Fix test_primary_failure test case (#303)
Feb 21, 2023
45bbf39
Move files to src and control dirs. (#307)
zhrt123 Feb 22, 2023
929c8cf
Fix gpdb release binary regex (#311)
beeender Mar 7, 2023
d7b350a
Enable test_postmaster_restart (#309)
zhrt123 Mar 7, 2023
1d306dd
Bump cmake min version to 3.20 (#313)
beeender Mar 16, 2023
f6ed4b8
Resource change for gpdb7 binary (#315)
beeender Mar 20, 2023
b2513b7
Fix bug: bgworker enters infinite loop after receiving notices from Q…
zhrt123 Mar 27, 2023
0aafc99
Ignore some hint/notice for GPDB7 (#328)
zhrt123 Apr 6, 2023
3b83f5c
fix flaky test: test_appendonly (#327)
zhrt123 Apr 6, 2023
27f039c
Add dbname to DiskQuotaWorkerEntry (#326)
zhrt123 Apr 6, 2023
09c8e94
Replace SPI_execute with SPI_cursor_fetch (#322)
zhrt123 Apr 6, 2023
2f52ef3
Split update SQL statement for diskquota.table_size (#325)
zhrt123 Apr 10, 2023
ec13344
Update cmake version in README. (#331)
woblerr Apr 14, 2023
a79bb8b
Fix flaky test: test_appendonly (#333)
zhrt123 Apr 17, 2023
87b8d22
Skip refresh_disk_quota_model() when receiving a signal (#321)
zhrt123 Apr 26, 2023
b4fbe92
Allocate more shared memory to quota_info (#334)
zhrt123 Apr 26, 2023
4e03357
Enable stanby test for 6X_STABLE (#335)
zhrt123 Apr 26, 2023
8275c63
Bump version to 2.2.1 (#336)
beeender Apr 27, 2023
c586718
Use install_gpdb_component in CI test (#337)
beeender Apr 27, 2023
1c10e03
Fix compiler warnings. (#339)
higuoxing May 25, 2023
583995b
Fix bug: diskquota.status() (#344)
zhrt123 Jun 26, 2023
36f02e5
fix pipeline (#345)
zhrt123 Jun 26, 2023
802c02d
Reduce the number of the log in bgworker. (#346)
zhrt123 Jun 27, 2023
adb7a41
Fix bug: lose monitored_dbid_cache after switching mirror (#342)
zhrt123 Jun 27, 2023
e224428
Enable continuous upgrade. (#340)
zhrt123 Jun 27, 2023
d1828bb
Fix pipeline. (#349)
zhrt123 Jun 28, 2023
4ddbe17
Fix upgrade version check (#347)
beeender Jun 28, 2023
c913730
Remove gp7 from pipeline (#350)
zhrt123 Jun 28, 2023
bc2cf9e
Add alter extension upgrade test (#348)
beeender Jun 28, 2023
7d7d5c5
Add a sleep in alter_test.sh (#351)
zhrt123 Jun 29, 2023
f7a9b82
Update to 2.2.2 (#352)
zhrt123 Jun 29, 2023
6d84bd7
Reduce the remain logs in bgworker. (#354)
zhrt123 Jul 3, 2023
3e93076
Fix bug: bgworkers only print log once. (#356)
zhrt123 Jul 4, 2023
7dd9b24
Disable forks for PR resource (#358)
beeender Jul 12, 2023
259808d
Release/gp7 2.2.2 (#361)
zhrt123 Jul 28, 2023
333e95a
Update to 2.3.0 (#362)
zhrt123 Aug 24, 2023
5247a83
Enable gpactivatestandby test (#363)
zhrt123 Aug 24, 2023
0151850
Add gpdb7 job back to pipeline. (#367)
zhrt123 Aug 24, 2023
53da826
fix creating extension with global option appendonly=true. (#366)
zhrt123 Aug 25, 2023
b291e2e
Fix continuous upgrade (#368)
zhrt123 Sep 8, 2023
2c897c2
Add GUC diskquota.max_monitored_databases. (#369)
zhrt123 Sep 12, 2023
2b46a30
Fix wrong test case (#374)
zhrt123 Sep 12, 2023
f39b162
Fix compilation issue caused by GP7 (#375)
zhrt123 Sep 12, 2023
c871b34
Add GUC diskquota.max_quotas (#372)
zhrt123 Sep 13, 2023
5ab2acc
Fix bug: the counter of quota_info_map works wrong (#378)
zhrt123 Sep 15, 2023
7a57e4b
Fix bug: diskquota stop working after removing any extension (#379)
zhrt123 Sep 19, 2023
6cf5e3e
Disable flaky test (#384)
zhrt123 Oct 18, 2023
bff1b38
Disable test_worker_schedule_exception (#385)
zhrt123 Oct 18, 2023
d1ddbba
Move concourse to gp-extension-ci repo (#383)
zhrt123 Oct 19, 2023
0b8aa98
Fix flaky test test_relation_size. (#387)
zhrt123 Oct 19, 2023
65a868e
Fix wrong test result on GP6. (#388)
zhrt123 Oct 19, 2023
ecd9d3d
Fix flaky test test_dbname_encoding (#389)
zhrt123 Oct 19, 2023
196e49e
Refactor quota info map (#380)
zhrt123 Oct 20, 2023
cb61528
[CMake] Fix package name for Rocky9/RHEL9 (#391)
beeender Oct 20, 2023
3186d37
Rename diskquota.max_quotas to diskquota.max_quota_probe (#390)
zhrt123 Oct 22, 2023
245f21c
Fix wrong shmem allocation. (#401)
zhrt123 Nov 7, 2023
c96e28d
Free tuple after use (#414)
Jan 10, 2024
4ac963b
fix: update acions (#417)
yihong0618 Jan 22, 2024
d196862
Invalidate diskquota.table_size entries during startup (#406)
RekGRpth Mar 7, 2024
598c885
Remove legacy CI and unused files from diskquota
tuhaihe Dec 9, 2025
2f048ec
Add diskquota support for Apache Cloudberry
tuhaihe Dec 9, 2025
4a607d4
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 @@ -314,6 +314,10 @@ jobs:
"gpcontrib/gp_toolkit:installcheck",
"gpcontrib/gp_exttable_fdw: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 @@ -1379,7 +1383,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 @@ -1322,7 +1322,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