summaryrefslogtreecommitdiff
path: root/src/test/regress/parallel_schedule
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-02-08 15:30:38 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2022-02-08 15:30:38 -0500
commitcc50080a828dd4791b43539f5a0f976e535d147c (patch)
tree787184da35163d8be525b7f84af85083e50d152a /src/test/regress/parallel_schedule
parentba15f16107bea8a93edc505f3013cd7df4ac90fc (diff)
downloadpostgresql-cc50080a828dd4791b43539f5a0f976e535d147c.tar.gz
Rearrange core regression tests to reduce cross-script dependencies.
The idea behind this patch is to make it possible to run individual test scripts without running the entire core test suite. Making all the scripts completely independent would involve a massive rewrite, and would probably be worse for coverage of things like concurrent DDL. So this patch just does what seems practical with limited changes. The net effect is that any test script can be run after running limited earlier dependencies: * all scripts depend on test_setup * many scripts depend on create_index * other dependencies are few in number, and are documented in the parallel_schedule file. To accomplish this, I chose a small number of commonly-used tables and moved their creation and filling into test_setup. Later scripts are expected not to modify these tables' data contents, for fear of affecting other scripts' results. Also, our former habit of declaring all C functions in one place is now gone in favor of declaring them where they're used, if that's just one script, or in test_setup if necessary. There's more that could be done to remove some of the remaining inter-script dependencies, but significantly more-invasive changes would be needed, and at least for now it doesn't seem worth it. Discussion: https://postgr.es/m/1114748.1640383217@sss.pgh.pa.us
Diffstat (limited to 'src/test/regress/parallel_schedule')
-rw-r--r--src/test/regress/parallel_schedule47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index 861c30a73a..82feda6eb1 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -1,6 +1,9 @@
# ----------
# src/test/regress/parallel_schedule
#
+# Most test scripts can be run after running just test_setup and possibly
+# create_index. Exceptions to this rule are documented below.
+#
# By convention, we put no more than twenty tests in any one parallel group;
# this limits the number of connections needed to run the tests.
# ----------
@@ -20,42 +23,31 @@ test: boolean char name varchar text int2 int4 int8 oid float4 float8 bit numeri
# ----------
# The second group of parallel tests
-# strings depends on char, varchar and text
-# numerology depends on int2, int4, int8, float4, float8
# multirangetypes depends on rangetypes
# multirangetypes shouldn't run concurrently with type_sanity
# ----------
-test: strings numerology point lseg line box path polygon circle date time timetz timestamp timestamptz interval inet macaddr macaddr8 multirangetypes create_function_0
+test: strings numerology point lseg line box path polygon circle date time timetz timestamp timestamptz interval inet macaddr macaddr8 multirangetypes
# ----------
# Another group of parallel tests
-# geometry depends on point, lseg, box, path, polygon and circle
-# horology depends on interval, timetz, timestamp, timestamptz
-# opr_sanity depends on create_function_0
+# geometry depends on point, lseg, line, box, path, polygon, circle
+# horology depends on date, time, timetz, timestamp, timestamptz, interval
# ----------
test: geometry horology tstypes regex type_sanity opr_sanity misc_sanity comments expressions unicode xid mvcc
# ----------
-# These four each depend on the previous one
-# ----------
-test: create_function_1
-test: create_type
-test: create_table
-test: create_function_2
-
-# ----------
# Load huge amounts of data
# We should split the data files into single files and then
-# execute two copy tests parallel, to check that copy itself
+# execute two copy tests in parallel, to check that copy itself
# is concurrent safe.
# ----------
test: copy copyselect copydml insert insert_conflict
# ----------
# More groups of parallel tests
+# Note: many of the tests in later groups depend on create_index
# ----------
-test: create_misc create_operator create_procedure
-# These depend on create_misc and create_operator
+test: create_function_0 create_misc create_operator create_procedure create_table create_type
test: create_index create_index_spgist create_view index_including index_including_gist
# ----------
@@ -69,11 +61,14 @@ test: create_aggregate create_function_3 create_cast constraints triggers select
# ----------
test: sanity_check
+# Note: the ignore: line does not skip random, just mark it as ignorable
+ignore: random
+
# ----------
# Another group of parallel tests
-# Note: the ignore: line does not run random, just mark it as ignorable
+# aggregates depends on create_aggregate
+# join depends on create_misc
# ----------
-ignore: random
test: select_into select_distinct select_distinct_on select_implicit select_having subselect union case join aggregates transactions random portals arrays btree_index hash_index update delete namespace prepared_xacts
# ----------
@@ -88,15 +83,18 @@ test: brin_bloom brin_multi
# ----------
# Another group of parallel tests
+# psql depends on create_am
+# amutils depends on geometry, create_index_spgist, hash_index, brin
# ----------
test: create_table_like alter_generic alter_operator misc async dbsize misc_functions sysviews tsrf tid tidscan tidrangescan collate.icu.utf8 incremental_sort create_role
-# rules cannot run concurrently with any test that creates
-# a view or rule in the public schema
# collate.*.utf8 tests cannot be run in parallel with each other
test: rules psql psql_crosstab amutils stats_ext collate.linux.utf8
-# run by itself so it can run parallel workers
+# ----------
+# Run these alone so they don't run out of parallel workers
+# select_parallel depends on create_misc
+# ----------
test: select_parallel
test: write_parallel
test: vacuum_parallel
@@ -106,6 +104,7 @@ test: publication subscription
# ----------
# Another group of parallel tests
+# select_views depends on create_view
# ----------
test: select_views portals_p2 foreign_key cluster dependency guc bitmapops combocid tsearch tsdicts foreign_data window xmlmap functional_deps advisory_lock indirect_toast equivclass
@@ -116,6 +115,7 @@ test: json jsonb json_encoding jsonpath jsonpath_encoding jsonb_jsonpath
# ----------
# Another group of parallel tests
+# with depends on create_misc
# NB: temp.sql does a reconnect which transiently uses 2 connections,
# so keep this parallel group to at most 19 tests
# ----------
@@ -126,9 +126,10 @@ test: plancache limit plpgsql copy2 temp domain rangefuncs prepare conversion tr
# ----------
test: partition_join partition_prune reloptions hash_part indexing partition_aggregate partition_info tuplesort explain compression memoize
-# event triggers cannot run concurrently with any test that runs DDL
+# event_trigger cannot run concurrently with any test that runs DDL
# oidjoins is read-only, though, and should run late for best coverage
test: event_trigger oidjoins
+
# this test also uses event triggers, so likewise run it by itself
test: fast_default