apache / cloudberry

One advanced and mature open-source MPP (Massively Parallel Processing) database. Open source alternative to Greenplum Database.
https://cloudberry.apache.org
Apache License 2.0
417 stars 104 forks source link

gpexpand: TRUNCATE coordinator-only tables for cleanup #666

Closed x4m closed 1 month ago

x4m commented 1 month ago

For a subset of coordinator only tables (non-mapped relations), we can go ahead and use TRUNCATE instead of DELETE, to gain a performance boost.

This is a cherry-pick of similar commit.

CLAassistant commented 1 month ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

x4m commented 1 month ago

I can't trace why orca test is failing. The diff is about statistics...

diff -I HINT: -I CONTEXT: -I GP_IGNORE: -U3 /code/gpdb_src/src/test/regress/expected/uaocs_compaction/stats.out /code/gpdb_src/src/test/regress/results/uaocs_compaction/stats.out
--- /code/gpdb_src/src/test/regress/expected/uaocs_compaction/stats.out 2024-10-15 18:00:30.460007469 +0800
+++ /code/gpdb_src/src/test/regress/results/uaocs_compaction/stats.out  2024-10-15 18:00:30.461007460 +0800
@@ -38,7 +38,7 @@
 SELECT relname, reltuples FROM pg_class WHERE relname = 'uaocs_stats_index';
       relname      | reltuples 
 -------------------+-----------
- uaocs_stats_index |        88
+ uaocs_stats_index |       113
 (1 row)
reshke commented 1 month ago

I can't trace why orca test is failing. The diff is about statistics...

diff -I HINT: -I CONTEXT: -I GP_IGNORE: -U3 /code/gpdb_src/src/test/regress/expected/uaocs_compaction/stats.out /code/gpdb_src/src/test/regress/results/uaocs_compaction/stats.out
--- /code/gpdb_src/src/test/regress/expected/uaocs_compaction/stats.out   2024-10-15 18:00:30.460007469 +0800
+++ /code/gpdb_src/src/test/regress/results/uaocs_compaction/stats.out    2024-10-15 18:00:30.461007460 +0800
@@ -38,7 +38,7 @@
 SELECT relname, reltuples FROM pg_class WHERE relname = 'uaocs_stats_index';
       relname      | reltuples 
 -------------------+-----------
- uaocs_stats_index |        88
+ uaocs_stats_index |       113
 (1 row)

restart tests

x4m commented 1 month ago

CI seems green, but CLA is pending for some reason (I've signed it).

tuhaihe commented 1 month ago

CI seems green, but CLA is pending for some reason (I've signed it).

Hi @x4m the CLA is not required for the pull request merge. So just ignore it. After we move Cloudberry repo to ASF, then there will be no CLA check.

Hi @yjhjstz could you please help look at this PR again? If good, welcome to help approve it, thanks!