Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/build-cloudberry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-deb-cloudberry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions contrib/amcheck/expected/check_heap.out
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
18 changes: 9 additions & 9 deletions contrib/amcheck/t/001_verify_heapam.pl
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,32 @@
#
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");

#
# Check a corrupt table with all-frozen data
#
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.
Expand Down Expand Up @@ -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");
}
}
Expand Down
7 changes: 6 additions & 1 deletion contrib/amcheck/t/003_cic_2pc.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -186,3 +190,4 @@

$node->stop;
done_testing();
}
Loading