diff --git a/.asf.yaml b/.asf.yaml index b62d041e0a1..e5c2673849c 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -93,6 +93,9 @@ github: - ic-contrib - ic-gpcontrib - ic-fixme + - ic-isolation2 + - ic-isolation2-crash + - ic-parallel-retrieve-cursor - Generate Apache Cloudberry Build Report # Pull request review requirements diff --git a/.github/workflows/build-cloudberry.yml b/.github/workflows/build-cloudberry.yml index a0a6e3dab4c..44f44d3dd88 100644 --- a/.github/workflows/build-cloudberry.yml +++ b/.github/workflows/build-cloudberry.yml @@ -757,6 +757,33 @@ jobs: pg_settings: optimizer: "" + - test: ic-isolation2 + make_configs: + - src/test/isolation2:installcheck-isolation2 + num_primary_mirror_pairs: 3 + enable_cgroups: true + enable_core_check: true + pg_settings: + optimizer: "" + + - test: ic-isolation2-crash + make_configs: + - src/test/isolation2:installcheck-isolation2-crash + num_primary_mirror_pairs: 3 + enable_cgroups: true + enable_core_check: false + pg_settings: + optimizer: "" + + - test: ic-parallel-retrieve-cursor + make_configs: + - src/test/isolation2:installcheck-parallel-retrieve-cursor + num_primary_mirror_pairs: 3 + enable_cgroups: true + enable_core_check: true + pg_settings: + optimizer: "" + container: image: apache/incubator-cloudberry:cbdb-build-rocky9-latest options: >- diff --git a/src/test/isolation2/Makefile b/src/test/isolation2/Makefile index 5567655774f..07860ffca12 100644 --- a/src/test/isolation2/Makefile +++ b/src/test/isolation2/Makefile @@ -75,6 +75,12 @@ installcheck-resgroup-v2: install installcheck-expandshrink: install $(pg_isolation2_regress_installcheck) --init-file=$(top_builddir)/src/test/regress/init_file --init-file=./init_file_isolation2 --dbname=isolation2expandshrinktest --schedule=$(srcdir)/isolation2_expandshrink_schedule +installcheck-isolation2: install + $(pg_isolation2_regress_installcheck) --init-file=$(top_builddir)/src/test/regress/init_file --init-file=./init_file_isolation2 --schedule=$(srcdir)/isolation2_schedule + +installcheck-isolation2-crash: install + $(pg_isolation2_regress_installcheck) --init-file=$(top_builddir)/src/test/regress/init_file --init-file=./init_file_isolation2 --schedule=$(srcdir)/isolation2_crash_schedule + installcheck-parallel-retrieve-cursor: install $(pg_isolation2_regress_installcheck) $(EXTRA_REGRESS_OPTS) --init-file=$(top_builddir)/src/test/regress/init_file --init-file=./init_file_parallel_retrieve_cursor --bindir='$(bindir)' --inputdir=$(srcdir) --dbname=isolation2parallelretrcursor --load-extension=gp_inject_fault --schedule=$(srcdir)/parallel_retrieve_cursor_schedule @@ -83,4 +89,4 @@ installcheck-cbdb-parallel: install (\ export PGOPTIONS='-c optimizer=off -c enable_parallel=true'; \ $(pg_isolation2_regress_installcheck) --init-file=$(top_builddir)/src/test/regress/init_file --init-file=./init_file_isolation2 --schedule=$(srcdir)/isolation2_schedule \ - ) \ No newline at end of file + ) diff --git a/src/test/isolation2/isolation2_crash_schedule b/src/test/isolation2/isolation2_crash_schedule new file mode 100644 index 00000000000..b1013619299 --- /dev/null +++ b/src/test/isolation2/isolation2_crash_schedule @@ -0,0 +1,17 @@ +# Tests for crash recovery +test: uao_crash_compaction_column +test: uao_crash_compaction_row +test: crash_recovery +test: crash_recovery_redundant_dtx +test: crash_recovery_dtm +test: unlogged_heap_tables +test: unlogged_appendonly_tables +test: udf_exception_blocks_panic_scenarios +test: ao_same_trans_truncate_crash +test: frozen_insert_crash + +test: prevent_ao_wal + +# Tests for packcore, will use the coredumps generated in crash_recovery_dtm, +# so must be scheduled after that one. +test: packcore diff --git a/src/test/isolation2/isolation2_schedule b/src/test/isolation2/isolation2_schedule index cd0ac485790..8d1c51a9942 100644 --- a/src/test/isolation2/isolation2_schedule +++ b/src/test/isolation2/isolation2_schedule @@ -14,24 +14,6 @@ test: ao_partition_lock test: select_dropped_table test: update_hash_col_utilitymode execute_on_utilitymode -# Tests for crash recovery -test: uao_crash_compaction_column -test: uao_crash_compaction_row -test: crash_recovery -test: crash_recovery_redundant_dtx -test: crash_recovery_dtm -test: unlogged_heap_tables -test: unlogged_appendonly_tables -test: udf_exception_blocks_panic_scenarios -test: ao_same_trans_truncate_crash -test: frozen_insert_crash - -test: prevent_ao_wal - -# Tests for packcore, will use the coredumps generated in crash_recovery_dtm, -# so must be scheduled after that one. -test: packcore - # Tests on global deadlock detector test: gdd/prepare test: gdd/concurrent_update diff --git a/src/test/isolation2/output/parallel_retrieve_cursor/explain.source b/src/test/isolation2/output/parallel_retrieve_cursor/explain.source index 2161b85a712..be88b52073b 100644 --- a/src/test/isolation2/output/parallel_retrieve_cursor/explain.source +++ b/src/test/isolation2/output/parallel_retrieve_cursor/explain.source @@ -115,48 +115,52 @@ VACUUM ANALYZE pg_class; VACUUM EXPLAIN (VERBOSE, COSTS false) DECLARE c1 CURSOR FOR SELECT * FROM pg_class; QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Seq Scan on pg_catalog.pg_class - Output: oid, relname, relnamespace, reltype, reloftype, relowner, relam, relfilenode, reltablespace, relpages, reltuples, relallvisible, reltoastrelid, relhasindex, relisshared, relpersistence, relkind, relnatts, relchecks, relhasrules, relhastriggers, relhassubclass, relrowsecurity, relforcerowsecurity, relispopulated, relreplident, relispartition, relisivm, relrewrite, relfrozenxid, relminmxid, relacl, reloptions, relpartbound - Optimizer: Postgres query optimizer -(3 rows) +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Seq Scan on pg_catalog.pg_class + Output: oid, relname, relnamespace, reltype, reloftype, relowner, relam, relfilenode, reltablespace, relpages, reltuples, relallvisible, reltoastrelid, relhasindex, relisshared, relpersistence, relkind, relnatts, relchecks, relhasrules, relhastriggers, relhassubclass, relrowsecurity, relforcerowsecurity, relispopulated, relreplident, relispartition, relisivm, relisdynamic, relrewrite, relfrozenxid, relminmxid, relacl, reloptions, relpartbound + Settings: enable_incremental_sort = 'on' + Optimizer: Postgres query optimizer +(4 rows) -- Test: explain output: Endpoint info (on coordinator/on some segments/on all segments) EXPLAIN (VERBOSE, COSTS false) DECLARE c1 PARALLEL RETRIEVE CURSOR FOR SELECT * FROM pg_class; QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Seq Scan on pg_catalog.pg_class - Output: oid, relname, relnamespace, reltype, reloftype, relowner, relam, relfilenode, reltablespace, relpages, reltuples, relallvisible, reltoastrelid, relhasindex, relisshared, relpersistence, relkind, relnatts, relchecks, relhasrules, relhastriggers, relhassubclass, relrowsecurity, relforcerowsecurity, relispopulated, relreplident, relispartition, relisivm, relrewrite, relfrozenxid, relminmxid, relacl, reloptions, relpartbound - Endpoint: "on coordinator" - Optimizer: Postgres query optimizer -(4 rows) +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Seq Scan on pg_catalog.pg_class + Output: oid, relname, relnamespace, reltype, reloftype, relowner, relam, relfilenode, reltablespace, relpages, reltuples, relallvisible, reltoastrelid, relhasindex, relisshared, relpersistence, relkind, relnatts, relchecks, relhasrules, relhastriggers, relhassubclass, relrowsecurity, relforcerowsecurity, relispopulated, relreplident, relispartition, relisivm, relisdynamic, relrewrite, relfrozenxid, relminmxid, relacl, reloptions, relpartbound + Settings: enable_incremental_sort = 'on' + Endpoint: "on coordinator" + Optimizer: Postgres query optimizer +(5 rows) EXPLAIN (VERBOSE, COSTS false) DECLARE c1 PARALLEL RETRIEVE CURSOR FOR SELECT * FROM pg_class ORDER BY relname; QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Index Scan using pg_class_relname_nsp_index on pg_catalog.pg_class - Output: oid, relname, relnamespace, reltype, reloftype, relowner, relam, relfilenode, reltablespace, relpages, reltuples, relallvisible, reltoastrelid, relhasindex, relisshared, relpersistence, relkind, relnatts, relchecks, relhasrules, relhastriggers, relhassubclass, relrowsecurity, relforcerowsecurity, relispopulated, relreplident, relispartition, relisivm, relrewrite, relfrozenxid, relminmxid, relacl, reloptions, relpartbound - Settings: enable_parallel = 'off', optimizer = 'off' - Endpoint: "on coordinator" - Optimizer: Postgres query optimizer +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Index Scan using pg_class_relname_nsp_index on pg_catalog.pg_class + Output: oid, relname, relnamespace, reltype, reloftype, relowner, relam, relfilenode, reltablespace, relpages, reltuples, relallvisible, reltoastrelid, relhasindex, relisshared, relpersistence, relkind, relnatts, relchecks, relhasrules, relhastriggers, relhassubclass, relrowsecurity, relforcerowsecurity, relispopulated, relreplident, relispartition, relisivm, relisdynamic, relrewrite, relfrozenxid, relminmxid, relacl, reloptions, relpartbound + Settings: enable_incremental_sort = 'on' + Endpoint: "on coordinator" + Optimizer: Postgres query optimizer (5 rows) EXPLAIN (VERBOSE, COSTS false) DECLARE c1 PARALLEL RETRIEVE CURSOR FOR SELECT * FROM pg_class WHERE gp_segment_id=1; QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Seq Scan on pg_catalog.pg_class - Output: oid, relname, relnamespace, reltype, reloftype, relowner, relam, relfilenode, reltablespace, relpages, reltuples, relallvisible, reltoastrelid, relhasindex, relisshared, relpersistence, relkind, relnatts, relchecks, relhasrules, relhastriggers, relhassubclass, relrowsecurity, relforcerowsecurity, relispopulated, relreplident, relispartition, relisivm, relrewrite, relfrozenxid, relminmxid, relacl, reloptions, relpartbound - Filter: (pg_class.gp_segment_id = 1) - Endpoint: "on coordinator" - Optimizer: Postgres query optimizer -(5 rows) +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Seq Scan on pg_catalog.pg_class + Output: oid, relname, relnamespace, reltype, reloftype, relowner, relam, relfilenode, reltablespace, relpages, reltuples, relallvisible, reltoastrelid, relhasindex, relisshared, relpersistence, relkind, relnatts, relchecks, relhasrules, relhastriggers, relhassubclass, relrowsecurity, relforcerowsecurity, relispopulated, relreplident, relispartition, relisivm, relisdynamic, relrewrite, relfrozenxid, relminmxid, relacl, reloptions, relpartbound + Filter: (pg_class.gp_segment_id = 1) + Settings: enable_incremental_sort = 'on' + Endpoint: "on coordinator" + Optimizer: Postgres query optimizer +(6 rows) EXPLAIN (VERBOSE, COSTS false) DECLARE c1 PARALLEL RETRIEVE CURSOR FOR SELECT * FROM pg_class WHERE gp_segment_id=1 OR gp_segment_id=2; QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Seq Scan on pg_catalog.pg_class - Output: oid, relname, relnamespace, reltype, reloftype, relowner, relam, relfilenode, reltablespace, relpages, reltuples, relallvisible, reltoastrelid, relhasindex, relisshared, relpersistence, relkind, relnatts, relchecks, relhasrules, relhastriggers, relhassubclass, relrowsecurity, relforcerowsecurity, relispopulated, relreplident, relispartition, relisivm, relrewrite, relfrozenxid, relminmxid, relacl, reloptions, relpartbound - Filter: ((pg_class.gp_segment_id = 1) OR (pg_class.gp_segment_id = 2)) - Endpoint: "on coordinator" - Optimizer: Postgres query optimizer -(5 rows) +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Seq Scan on pg_catalog.pg_class + Output: oid, relname, relnamespace, reltype, reloftype, relowner, relam, relfilenode, reltablespace, relpages, reltuples, relallvisible, reltoastrelid, relhasindex, relisshared, relpersistence, relkind, relnatts, relchecks, relhasrules, relhastriggers, relhassubclass, relrowsecurity, relforcerowsecurity, relispopulated, relreplident, relispartition, relisivm, relisdynamic, relrewrite, relfrozenxid, relminmxid, relacl, reloptions, relpartbound + Filter: ((pg_class.gp_segment_id = 1) OR (pg_class.gp_segment_id = 2)) + Settings: enable_incremental_sort = 'on' + Endpoint: "on coordinator" + Optimizer: Postgres query optimizer +(6 rows) -- Test for UDF which can be executed on coordinator EXPLAIN (VERBOSE, COSTS false) DECLARE c1 PARALLEL RETRIEVE CURSOR FOR SELECT * FROM generate_series(1,10) as F;