diff --git a/.github/workflows/build-cloudberry.yml b/.github/workflows/build-cloudberry.yml index 4f4d4f3939a..1d529e21b11 100644 --- a/.github/workflows/build-cloudberry.yml +++ b/.github/workflows/build-cloudberry.yml @@ -286,6 +286,7 @@ jobs: }, {"test":"ic-contrib", "make_configs":["contrib/auto_explain:installcheck", + "contrib/amcheck:installcheck", "contrib/citext:installcheck", "contrib/btree_gin:installcheck", "contrib/file_fdw:installcheck", diff --git a/.github/workflows/build-deb-cloudberry.yml b/.github/workflows/build-deb-cloudberry.yml index 6299c9500c6..2e87b8aa948 100644 --- a/.github/workflows/build-deb-cloudberry.yml +++ b/.github/workflows/build-deb-cloudberry.yml @@ -225,6 +225,7 @@ jobs: }, {"test":"ic-deb-contrib", "make_configs":["contrib/auto_explain:installcheck", + "contrib/amcheck:installcheck", "contrib/citext:installcheck", "contrib/btree_gin:installcheck", "contrib/file_fdw:installcheck", diff --git a/contrib/amcheck/expected/check_heap.out b/contrib/amcheck/expected/check_heap.out index b6e98eaa68d..cf9ff0941d0 100644 --- a/contrib/amcheck/expected/check_heap.out +++ b/contrib/amcheck/expected/check_heap.out @@ -227,7 +227,7 @@ CREATE TABLE test_partitioned (a int, b text default repeat('x', 5000)) SELECT * FROM verify_heapam('test_partitioned', startblock := NULL, endblock := NULL); -ERROR: "test_partitioned" is not a table, materialized view, or TOAST table +ERROR: "test_partitioned" is not a table, directory table, materialized view, or TOAST table CONTEXT: SQL statement "SELECT t.blkno, t.offnum, t.attnum, t.msg FROM verify_heapam_internal(relation, on_error_stop, @@ -268,7 +268,7 @@ CREATE INDEX test_index ON test_partition (a); SELECT * FROM verify_heapam('test_index', startblock := NULL, endblock := NULL); -ERROR: "test_index" is not a table, materialized view, or TOAST table +ERROR: "test_index" is not a table, directory table, materialized view, or TOAST table CONTEXT: SQL statement "SELECT t.blkno, t.offnum, t.attnum, t.msg FROM verify_heapam_internal(relation, on_error_stop, @@ -283,7 +283,7 @@ CREATE VIEW test_view AS SELECT 1; SELECT * FROM verify_heapam('test_view', startblock := NULL, endblock := NULL); -ERROR: "test_view" is not a table, materialized view, or TOAST table +ERROR: "test_view" is not a table, directory table, materialized view, or TOAST table CONTEXT: SQL statement "SELECT t.blkno, t.offnum, t.attnum, t.msg FROM verify_heapam_internal(relation, on_error_stop, @@ -298,7 +298,7 @@ CREATE SEQUENCE test_sequence; SELECT * FROM verify_heapam('test_sequence', startblock := NULL, endblock := NULL); -ERROR: "test_sequence" is not a table, materialized view, or TOAST table +ERROR: "test_sequence" is not a table, directory table, materialized view, or TOAST table CONTEXT: SQL statement "SELECT t.blkno, t.offnum, t.attnum, t.msg FROM verify_heapam_internal(relation, on_error_stop, @@ -315,7 +315,7 @@ CREATE FOREIGN TABLE test_foreign_table () SERVER dummy_server; SELECT * FROM verify_heapam('test_foreign_table', startblock := NULL, endblock := NULL); -ERROR: "test_foreign_table" is not a table, materialized view, or TOAST table +ERROR: "test_foreign_table" is not a table, directory table, materialized view, or TOAST table CONTEXT: SQL statement "SELECT t.blkno, t.offnum, t.attnum, t.msg FROM verify_heapam_internal(relation, on_error_stop, diff --git a/contrib/amcheck/t/001_verify_heapam.pl b/contrib/amcheck/t/001_verify_heapam.pl index 64ba64d6b41..b9dbb42a67f 100644 --- a/contrib/amcheck/t/001_verify_heapam.pl +++ b/contrib/amcheck/t/001_verify_heapam.pl @@ -31,18 +31,18 @@ # fresh_test_table('test'); corrupt_first_page('test'); -detects_heap_corruption("verify_heapam('test')", "plain corrupted table"); +detects_heap_corruption("verify_heapam_internal('test')", "plain corrupted table"); detects_heap_corruption( - "verify_heapam('test', skip := 'all-visible')", + "verify_heapam_internal('test', skip := 'all-visible')", "plain corrupted table skipping all-visible"); detects_heap_corruption( - "verify_heapam('test', skip := 'all-frozen')", + "verify_heapam_internal('test', skip := 'all-frozen')", "plain corrupted table skipping all-frozen"); detects_heap_corruption( - "verify_heapam('test', check_toast := false)", + "verify_heapam_internal('test', check_toast := false)", "plain corrupted table skipping toast"); detects_heap_corruption( - "verify_heapam('test', startblock := 0, endblock := 0)", + "verify_heapam_internal('test', startblock := 0, endblock := 0)", "plain corrupted table checking only block zero"); # @@ -50,13 +50,13 @@ # fresh_test_table('test'); $node->safe_psql('postgres', q(VACUUM (FREEZE, DISABLE_PAGE_SKIPPING) test)); -detects_no_corruption("verify_heapam('test')", +detects_no_corruption("verify_heapam_internal('test')", "all-frozen not corrupted table"); corrupt_first_page('test'); -detects_heap_corruption("verify_heapam('test')", +detects_heap_corruption("verify_heapam_internal('test')", "all-frozen corrupted table"); detects_no_corruption( - "verify_heapam('test', skip := 'all-frozen')", + "verify_heapam_internal('test', skip := 'all-frozen')", "all-frozen corrupted table skipping all-frozen"); # Returns the filesystem path for the named relation. @@ -208,7 +208,7 @@ sub check_all_options_uncorrupted . "endblock := $endblock"; detects_no_corruption( - "verify_heapam('$relname', $opts)", + "verify_heapam_internal('$relname', $opts)", "$prefix: $opts"); } } diff --git a/contrib/amcheck/t/003_cic_2pc.pl b/contrib/amcheck/t/003_cic_2pc.pl index 445aabaa5e9..eb4d9361955 100644 --- a/contrib/amcheck/t/003_cic_2pc.pl +++ b/contrib/amcheck/t/003_cic_2pc.pl @@ -9,7 +9,11 @@ use PostgresNode; use TestLib; -use Test::More tests => 5; +use Test::More tests => 0 + 1;#5; + +SKIP: +{ + skip "TWO PHASE transactions are not supported in Cloudberry, skip test", 1; Test::More->builder->todo_start('filesystem bug') if TestLib::has_wal_read_bug; @@ -186,3 +190,4 @@ $node->stop; done_testing(); +}