As none of the approaches for avoiding the deadlock issues seem
promising enough, and all the expected reindex related changes have
been made, apply
60c2951e1bab7e to master as well.
Discussion: https://postgr.es/m/4622.
1556982247@sss.pgh.pa.us
--
-- Check that system tables can be reindexed.
--
--- Note that this test currently has to run without parallel tests
--- being scheduled, as currently reindex catalog tables can cause
+-- Note that this test currently is not included in the default
+-- schedules, as currently reindexing catalog tables can cause
-- deadlocks:
--
-- * The lock upgrade between the ShareLock acquired for the reindex
-- tables are routinely released before commit - therefore the lock
-- held for reindexing doesn't guarantee that no running transaction
-- performed modifications in the table underlying the index.
+--
+-- This is particularly problematic as such conflicts can be
+-- triggered even when run in isolation, as a previous session's
+-- temporary table cleanup might still be running (even when the
+-- session ended from a client perspective).
-- Check reindexing of whole tables
REINDEX TABLE pg_class; -- mapped, non-shared, critical
REINDEX TABLE pg_index; -- non-mapped, non-shared, critical
# These depend on create_misc and create_operator
test: create_index create_index_spgist create_view index_including index_including_gist
-# ----------
-# Has to run in isolation, due to deadlock risk
-# ----------
-test: reindex_catalog
-
# ----------
# Another group of parallel tests
# ----------
test: create_view
test: index_including
test: index_including_gist
-test: reindex_catalog
test: create_aggregate
test: create_function_3
test: create_cast
--
-- Check that system tables can be reindexed.
--
--- Note that this test currently has to run without parallel tests
--- being scheduled, as currently reindex catalog tables can cause
+-- Note that this test currently is not included in the default
+-- schedules, as currently reindexing catalog tables can cause
-- deadlocks:
--
-- * The lock upgrade between the ShareLock acquired for the reindex
-- tables are routinely released before commit - therefore the lock
-- held for reindexing doesn't guarantee that no running transaction
-- performed modifications in the table underlying the index.
+--
+-- This is particularly problematic as such conflicts can be
+-- triggered even when run in isolation, as a previous session's
+-- temporary table cleanup might still be running (even when the
+-- session ended from a client perspective).
-- Check reindexing of whole tables