Remove isolation test reindex-partitions
authorMichael Paquier
Tue, 8 Sep 2020 02:15:21 +0000 (11:15 +0900)
committerMichael Paquier
Tue, 8 Sep 2020 02:15:21 +0000 (11:15 +0900)
The isolation test added by a6642b3 is proving to be unstable, as once
the first transaction holding a lock on the top-most partitioned table
or on a partition commits, the commit order of the follow-up DROP TABLE
and REINDEX could become reversed depending on the timing.

The only part of the test that could be entirely reliable is the one
using a SHARE lock, allowing REINDEX to commit first, but it is the
least interesting of the set.

Per buildfarm members rorqual and mylodon.

Discussion: https://postgr.es/m/[email protected]

src/test/isolation/expected/reindex-partitions.out [deleted file]
src/test/isolation/isolation_schedule
src/test/isolation/specs/reindex-partitions.spec [deleted file]

diff --git a/src/test/isolation/expected/reindex-partitions.out b/src/test/isolation/expected/reindex-partitions.out
deleted file mode 100644 (file)
index 5373abd..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-Parsed test spec with 3 sessions
-
-starting permutation: begin1 lockexcl1 reindex2 drop3 end1
-step begin1: BEGIN;
-step lockexcl1: LOCK reind_conc_parent IN ACCESS EXCLUSIVE MODE;
-step reindex2: REINDEX TABLE reind_conc_parent; 
-step drop3: DROP TABLE reind_conc_10_20; 
-step end1: COMMIT;
-step reindex2: <... completed>
-step drop3: <... completed>
-
-starting permutation: begin1 lockexcl1 reindex_conc2 drop3 end1
-step begin1: BEGIN;
-step lockexcl1: LOCK reind_conc_parent IN ACCESS EXCLUSIVE MODE;
-step reindex_conc2: REINDEX TABLE CONCURRENTLY reind_conc_parent; 
-step drop3: DROP TABLE reind_conc_10_20; 
-step end1: COMMIT;
-step reindex_conc2: <... completed>
-step drop3: <... completed>
-
-starting permutation: begin1 lockshare1 reindex2 drop3 end1
-step begin1: BEGIN;
-step lockshare1: LOCK reind_conc_parent IN SHARE MODE;
-step reindex2: REINDEX TABLE reind_conc_parent;
-step drop3: DROP TABLE reind_conc_10_20; 
-step end1: COMMIT;
-step drop3: <... completed>
-
-starting permutation: begin1 lockshare1 reindex_conc2 drop3 end1
-step begin1: BEGIN;
-step lockshare1: LOCK reind_conc_parent IN SHARE MODE;
-step reindex_conc2: REINDEX TABLE CONCURRENTLY reind_conc_parent; 
-step drop3: DROP TABLE reind_conc_10_20; 
-step end1: COMMIT;
-step reindex_conc2: <... completed>
-step drop3: <... completed>
-
-starting permutation: begin1 lockupdate1 reindex2 drop3 end1
-step begin1: BEGIN;
-step lockupdate1: LOCK reind_conc_parent IN SHARE UPDATE EXCLUSIVE MODE;
-step reindex2: REINDEX TABLE reind_conc_parent; 
-step drop3: DROP TABLE reind_conc_10_20; 
-step end1: COMMIT;
-step reindex2: <... completed>
-step drop3: <... completed>
-
-starting permutation: begin1 lockupdate1 reindex_conc2 drop3 end1
-step begin1: BEGIN;
-step lockupdate1: LOCK reind_conc_parent IN SHARE UPDATE EXCLUSIVE MODE;
-step reindex_conc2: REINDEX TABLE CONCURRENTLY reind_conc_parent; 
-step drop3: DROP TABLE reind_conc_10_20; 
-step end1: COMMIT;
-step reindex_conc2: <... completed>
-step drop3: <... completed>
-
-starting permutation: begin1 lockpartexcl1 reindex2 drop3 end1
-step begin1: BEGIN;
-step lockpartexcl1: LOCK reind_conc_10_20 IN ACCESS EXCLUSIVE MODE;
-step reindex2: REINDEX TABLE reind_conc_parent; 
-step drop3: DROP TABLE reind_conc_10_20; 
-step end1: COMMIT;
-step reindex2: <... completed>
-step drop3: <... completed>
-
-starting permutation: begin1 lockpartexcl1 reindex_conc2 drop3 end1
-step begin1: BEGIN;
-step lockpartexcl1: LOCK reind_conc_10_20 IN ACCESS EXCLUSIVE MODE;
-step reindex_conc2: REINDEX TABLE CONCURRENTLY reind_conc_parent; 
-step drop3: DROP TABLE reind_conc_10_20; 
-step end1: COMMIT;
-step reindex_conc2: <... completed>
-step drop3: <... completed>
-
-starting permutation: begin1 lockpartshare1 reindex2 drop3 end1
-step begin1: BEGIN;
-step lockpartshare1: LOCK reind_conc_10_20 IN SHARE MODE;
-step reindex2: REINDEX TABLE reind_conc_parent;
-step drop3: DROP TABLE reind_conc_10_20; 
-step end1: COMMIT;
-step drop3: <... completed>
-
-starting permutation: begin1 lockpartshare1 reindex_conc2 drop3 end1
-step begin1: BEGIN;
-step lockpartshare1: LOCK reind_conc_10_20 IN SHARE MODE;
-step reindex_conc2: REINDEX TABLE CONCURRENTLY reind_conc_parent; 
-step drop3: DROP TABLE reind_conc_10_20; 
-step end1: COMMIT;
-step reindex_conc2: <... completed>
-step drop3: <... completed>
-
-starting permutation: begin1 lockpartupdate1 reindex2 drop3 end1
-step begin1: BEGIN;
-step lockpartupdate1: LOCK reind_conc_10_20 IN SHARE UPDATE EXCLUSIVE MODE;
-step reindex2: REINDEX TABLE reind_conc_parent; 
-step drop3: DROP TABLE reind_conc_10_20; 
-step end1: COMMIT;
-step reindex2: <... completed>
-step drop3: <... completed>
-
-starting permutation: begin1 lockpartupdate1 reindex_conc2 drop3 end1
-step begin1: BEGIN;
-step lockpartupdate1: LOCK reind_conc_10_20 IN SHARE UPDATE EXCLUSIVE MODE;
-step reindex_conc2: REINDEX TABLE CONCURRENTLY reind_conc_parent; 
-step drop3: DROP TABLE reind_conc_10_20; 
-step end1: COMMIT;
-step reindex_conc2: <... completed>
-step drop3: <... completed>
index 65d1443ac6841a41a0eb29670e7ec20774b3c810..6acbb695eceaa7db0ff8a0d9694b345037fabe1b 100644 (file)
@@ -50,7 +50,6 @@ test: lock-committed-keyupdate
 test: update-locked-tuple
 test: reindex-concurrently
 test: reindex-schema
-test: reindex-partitions
 test: propagate-lock-delete
 test: tuplelock-conflict
 test: tuplelock-update
diff --git a/src/test/isolation/specs/reindex-partitions.spec b/src/test/isolation/specs/reindex-partitions.spec
deleted file mode 100644 (file)
index 1a4dd1b..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-# REINDEX with partitioned tables
-#
-# Ensure that concurrent and non-concurrent operations work correctly when
-# a REINDEX is performed on a partitioned table or index.
-
-# In the cases dealt with here, partition leaves are dropped in parallel of
-# a REINDEX.  DROP TABLE gets blocked by the first transaction of REINDEX
-# building the list of partitions, so it will finish executing once REINDEX
-# is done.
-
-setup
-{
-   CREATE TABLE reind_conc_parent (id int) PARTITION BY RANGE (id);
-   CREATE TABLE reind_conc_0_10 PARTITION OF reind_conc_parent
-     FOR VALUES FROM (0) TO (10);
-   CREATE TABLE reind_conc_10_20 PARTITION OF reind_conc_parent
-     FOR VALUES FROM (10) TO (20);
-   INSERT INTO reind_conc_parent VALUES (generate_series(0, 19));
-}
-
-teardown
-{
-   DROP TABLE reind_conc_parent;
-}
-
-session "s1"
-step "begin1"          { BEGIN; }
-step "lockexcl1"       { LOCK reind_conc_parent IN ACCESS EXCLUSIVE MODE; }
-step "lockshare1"      { LOCK reind_conc_parent IN SHARE MODE; }
-step "lockupdate1"     { LOCK reind_conc_parent IN SHARE UPDATE EXCLUSIVE MODE; }
-step "lockpartexcl1"   { LOCK reind_conc_10_20 IN ACCESS EXCLUSIVE MODE; }
-step "lockpartshare1"  { LOCK reind_conc_10_20 IN SHARE MODE; }
-step "lockpartupdate1" { LOCK reind_conc_10_20 IN SHARE UPDATE EXCLUSIVE MODE; }
-step "end1"            { COMMIT; }
-
-session "s2"
-step "reindex2"        { REINDEX TABLE reind_conc_parent; }
-step "reindex_conc2"   { REINDEX TABLE CONCURRENTLY reind_conc_parent; }
-
-session "s3"
-step "drop3"           { DROP TABLE reind_conc_10_20; }
-
-# An existing partition leaf is dropped after reindex is done when the
-# parent is locked.
-permutation "begin1" "lockexcl1" "reindex2" "drop3" "end1"
-permutation "begin1" "lockexcl1" "reindex_conc2" "drop3" "end1"
-permutation "begin1" "lockshare1" "reindex2" "drop3" "end1"
-permutation "begin1" "lockshare1" "reindex_conc2" "drop3" "end1"
-permutation "begin1" "lockupdate1" "reindex2" "drop3" "end1"
-permutation "begin1" "lockupdate1" "reindex_conc2" "drop3" "end1"
-
-# An existing partition leaf is dropped after reindex is done when this
-# leaf is locked.
-permutation "begin1" "lockpartexcl1" "reindex2" "drop3" "end1"
-permutation "begin1" "lockpartexcl1" "reindex_conc2" "drop3" "end1"
-permutation "begin1" "lockpartshare1" "reindex2" "drop3" "end1"
-permutation "begin1" "lockpartshare1" "reindex_conc2" "drop3" "end1"
-permutation "begin1" "lockpartupdate1" "reindex2" "drop3" "end1"
-permutation "begin1" "lockpartupdate1" "reindex_conc2" "drop3" "end1"