Rethink blocking annotations in detach-partition-concurrently-[34].

In 741d7f104, I tried to make the reports from canceled steps come out
after the pg_cancel_backend() steps, since that was the most common
ordering before.  However, that doesn't ensure that a canceled step
doesn't report even later, as shown in a recent failure on buildfarm
member idiacanthus.  Rather than complicating things even more with
additional annotations, let's just force the cancel's effect to be
reported first.  It's not *that* unnatural-looking.

Back-patch to v14 where these test cases appeared.

Report: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=idiacanthus&dt=2021-07-02%2001%3A40%3A04
This commit is contained in:
Tom Lane 2021-07-05 14:34:47 -04:00
parent f025f2390e
commit c04c767059
4 changed files with 143 additions and 117 deletions

View File

@ -10,14 +10,15 @@ a
(1 row)
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1describe: SELECT 'd3_listp' AS root, * FROM pg_partition_tree('d3_listp')
UNION ALL SELECT 'd3_listp1', * FROM pg_partition_tree('d3_listp1');
@ -41,14 +42,15 @@ a
(1 row)
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1insert: INSERT INTO d3_listp VALUES (1);
ERROR: no partition of relation "d3_listp" found for row
step s1c: COMMIT;
@ -63,14 +65,15 @@ a
(1 row)
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1insert: INSERT INTO d3_listp VALUES (1);
step s1c: COMMIT;
step s1spart: SELECT * FROM d3_listp1;
@ -91,14 +94,15 @@ a
(1 row)
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1insertpart: INSERT INTO d3_listp1 VALUES (1);
@ -112,14 +116,15 @@ a
(1 row)
step s2detach2: ALTER TABLE d3_listp DETACH PARTITION d3_listp2 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach2: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach2: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1insert: INSERT INTO d3_listp VALUES (1);
@ -143,14 +148,15 @@ a
(1 row)
step s2detach2: ALTER TABLE d3_listp DETACH PARTITION d3_listp2 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach2: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach2: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1s: SELECT * FROM d3_listp;
@ -179,14 +185,15 @@ a
(1 row)
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1drop: DROP TABLE d3_listp;
step s1list: SELECT relname FROM pg_catalog.pg_class
@ -206,14 +213,15 @@ a
(1 row)
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1trunc: TRUNCATE TABLE d3_listp;
step s1spart: SELECT * FROM d3_listp1;
@ -233,14 +241,15 @@ a
(1 row)
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1noop:
step s2detach2: ALTER TABLE d3_listp DETACH PARTITION d3_listp2 CONCURRENTLY;
ERROR: partition "d3_listp1" already pending detach in partitioned table "public.d3_listp"
@ -256,14 +265,15 @@ a
(1 row)
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1noop:
step s2detachfinal: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 FINALIZE; <waiting ...>
step s1c: COMMIT;
@ -280,14 +290,15 @@ a
(1 row)
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1droppart: DROP TABLE d3_listp1;
step s2detach2: ALTER TABLE d3_listp DETACH PARTITION d3_listp2 CONCURRENTLY;
@ -302,14 +313,15 @@ a
(1 row)
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s2begin: BEGIN;
step s2drop: DROP TABLE d3_listp1;
@ -331,14 +343,15 @@ a
(1 row)
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1b: BEGIN;
step s1spart: SELECT * FROM d3_listp1;
@ -361,14 +374,15 @@ a
(1 row)
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
@ -389,14 +403,15 @@ a
(1 row)
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1b: BEGIN;
step s1spart: SELECT * FROM d3_listp1;
@ -419,14 +434,15 @@ a
(1 row)
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s2begin: BEGIN;
step s2detachfinal: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 FINALIZE;
@ -442,14 +458,15 @@ a
(1 row)
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s2begin: BEGIN;
step s2detachfinal: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 FINALIZE;
@ -472,14 +489,15 @@ a
(1 row)
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s2begin: BEGIN;
step s2detachfinal: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 FINALIZE;

View File

@ -11,14 +11,15 @@ a
(2 rows)
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
step s1cancel: select pg_cancel_backend(pid) from d4_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
step s1c: commit;
@ -50,14 +51,15 @@ a
(2 rows)
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
step s1cancel: select pg_cancel_backend(pid) from d4_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
step s1c: commit;
@ -83,14 +85,15 @@ step s2snitch: insert into d4_pid select pg_backend_pid();
step s1b: begin;
step s1declare: declare f cursor for select * from d4_primary;
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
step s1cancel: select pg_cancel_backend(pid) from d4_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1fetchall: fetch all from f;
a
-
@ -124,14 +127,15 @@ step s2snitch: insert into d4_pid select pg_backend_pid();
step s1b: begin;
step s1declare: declare f cursor for select * from d4_primary;
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
step s1cancel: select pg_cancel_backend(pid) from d4_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1svpt: savepoint f;
step s1insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
@ -251,14 +255,15 @@ a
(1 row)
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
step s1cancel: select pg_cancel_backend(pid) from d4_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1updcur: update d4_fk set a = 1 where current of f;
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
step s1c: commit;
@ -326,14 +331,15 @@ step s3brr: begin isolation level repeatable read;
step s3insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
step s3commit: commit;
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
step s1cancel: select pg_cancel_backend(pid) from d4_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: commit;
starting permutation: s2snitch s1b s1s s2detach s3brr s3insert s3commit s1c
@ -365,14 +371,15 @@ a
(2 rows)
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
step s1cancel: select pg_cancel_backend(pid) from d4_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1noop:
step s3vacfreeze: vacuum freeze pg_catalog.pg_inherits;
step s1s: select * from d4_primary;
@ -397,14 +404,15 @@ a
(2 rows)
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
step s1cancel: select pg_cancel_backend(pid) from d4_pid; <waiting ...>
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1cancel: <... completed>
pg_cancel_backend
-----------------
t
(1 row)
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1noop:
step s3vacfreeze: vacuum freeze pg_catalog.pg_inherits;
step s1s: select * from d4_primary;

View File

@ -1,8 +1,8 @@
# Try various things to happen to a partition with an incomplete detach
#
# Note: When using "s1cancel", mark the target step (the one to be canceled)
# as being blocked by "s1cancel". This ensures consistent reporting regardless
# of whether "s1cancel" returns before or after the other step reports failure.
# as blocking "s1cancel". This ensures consistent reporting regardless of
# whether "s1cancel" finishes before or after the other step reports failure.
# Also, ensure the step after "s1cancel" is also an s1 step (use "s1noop" if
# necessary). This ensures we won't move on to the next step until the cancel
# is complete.
@ -50,37 +50,37 @@ step s2commit { COMMIT; }
# Try various things while the partition is in "being detached" state, with
# no session waiting.
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1c s1describe s1alter
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1insert s1c
permutation s2snitch s1brr s1s s2detach(s1cancel) s1cancel s1insert s1c s1spart
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1c s1insertpart
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s1describe s1alter
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1insert s1c
permutation s2snitch s1brr s1s s2detach s1cancel(s2detach) s1insert s1c s1spart
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s1insertpart
# Test partition descriptor caching
permutation s2snitch s1b s1s s2detach2(s1cancel) s1cancel s1c s1brr s1insert s1s s1insert s1c
permutation s2snitch s1b s1s s2detach2(s1cancel) s1cancel s1c s1brr s1s s1insert s1s s1c
permutation s2snitch s1b s1s s2detach2 s1cancel(s2detach2) s1c s1brr s1insert s1s s1insert s1c
permutation s2snitch s1b s1s s2detach2 s1cancel(s2detach2) s1c s1brr s1s s1insert s1s s1c
# "drop" here does both tables
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1c s1drop s1list
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s1drop s1list
# "truncate" only does parent, not partition
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1c s1trunc s1spart
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s1trunc s1spart
# If a partition pending detach exists, we cannot drop another one
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1noop s2detach2 s1c
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1noop s2detachfinal s1c s2detach2
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1c s1droppart s2detach2
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1noop s2detach2 s1c
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1noop s2detachfinal s1c s2detach2
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s1droppart s2detach2
# When a partition with incomplete detach is dropped, we grab lock on parent too.
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1c s2begin s2drop s1s s2commit
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s2begin s2drop s1s s2commit
# Partially detach, then select and try to complete the detach. Reading
# from partition blocks (AEL is required on partition); reading from parent
# does not block.
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1c s1b s1spart s2detachfinal s1c
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1c s1b s1s s2detachfinal s1c
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s1b s1spart s2detachfinal s1c
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s1b s1s s2detachfinal s1c
# DETACH FINALIZE in a transaction block. No insert/select on the partition
# is allowed concurrently with that.
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1c s1b s1spart s2detachfinal s1c
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1c s2begin s2detachfinal s2commit
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1c s2begin s2detachfinal s1spart s2commit
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1c s2begin s2detachfinal s1insertpart s2commit
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s1b s1spart s2detachfinal s1c
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s2begin s2detachfinal s2commit
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s2begin s2detachfinal s1spart s2commit
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s2begin s2detachfinal s1insertpart s2commit

View File

@ -5,8 +5,8 @@
# that keeping both variants adds any extra coverage.)
#
# Note: When using "s1cancel", mark the target step (the one to be canceled)
# as being blocked by "s1cancel". This ensures consistent reporting regardless
# of whether "s1cancel" returns before or after the other step reports failure.
# as blocking "s1cancel". This ensures consistent reporting regardless of
# whether "s1cancel" finishes before or after the other step reports failure.
# Also, ensure the step after "s1cancel" is also an s1 step (use "s1noop" if
# necessary). This ensures we won't move on to the next step until the cancel
# is complete.
@ -50,34 +50,34 @@ step s3commit { commit; }
step s3vacfreeze { vacuum freeze pg_catalog.pg_inherits; }
# Trying to insert into a partially detached partition is rejected
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1insert s1c
permutation s2snitch s1b s1s s2detach s1insert s1c
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1insert s1c
permutation s2snitch s1b s1s s2detach s1insert s1c
# ... even under REPEATABLE READ mode.
permutation s2snitch s1brr s1s s2detach(s1cancel) s1cancel s1insert s1c
permutation s2snitch s1brr s1s s2detach s1insert s1c
permutation s2snitch s1brr s1s s2detach s1cancel(s2detach) s1insert s1c
permutation s2snitch s1brr s1s s2detach s1insert s1c
# If you read the referenced table using a cursor, you can see a row that the
# RI query does not see.
permutation s2snitch s1b s1declare s2detach(s1cancel) s1cancel s1fetchall s1insert s1c
permutation s2snitch s1b s1declare s2detach s1fetchall s1insert s1c
permutation s2snitch s1b s1declare s2detach(s1cancel) s1cancel s1svpt s1insert s1rollback s1fetchall s1c
permutation s2snitch s1b s1declare s2detach s1svpt s1insert s1rollback s1fetchall s1c
permutation s2snitch s1b s2detach(s1cancel) s1declare s1cancel s1fetchall s1insert s1c
permutation s2snitch s1b s2detach s1declare s1fetchall s1insert s1c
permutation s2snitch s1b s2detach(s1cancel) s1declare s1cancel s1svpt s1insert s1rollback s1fetchall s1c
permutation s2snitch s1b s2detach s1declare s1svpt s1insert s1rollback s1fetchall s1c
permutation s2snitch s1b s1declare s2detach s1cancel(s2detach) s1fetchall s1insert s1c
permutation s2snitch s1b s1declare s2detach s1fetchall s1insert s1c
permutation s2snitch s1b s1declare s2detach s1cancel(s2detach) s1svpt s1insert s1rollback s1fetchall s1c
permutation s2snitch s1b s1declare s2detach s1svpt s1insert s1rollback s1fetchall s1c
permutation s2snitch s1b s2detach s1declare s1cancel(s2detach) s1fetchall s1insert s1c
permutation s2snitch s1b s2detach s1declare s1fetchall s1insert s1c
permutation s2snitch s1b s2detach s1declare s1cancel(s2detach) s1svpt s1insert s1rollback s1fetchall s1c
permutation s2snitch s1b s2detach s1declare s1svpt s1insert s1rollback s1fetchall s1c
# Creating the referencing row using a cursor
permutation s2snitch s1brr s1declare2 s1fetchone s2detach(s1cancel) s1cancel s1updcur s1c
permutation s2snitch s1brr s1declare2 s1fetchone s2detach s1updcur s1c
permutation s2snitch s1brr s1declare2 s1fetchone s2detach s1cancel(s2detach) s1updcur s1c
permutation s2snitch s1brr s1declare2 s1fetchone s2detach s1updcur s1c
permutation s2snitch s1brr s1declare2 s1fetchone s1updcur s2detach s1c
# Try reading the table from an independent session.
permutation s2snitch s1b s1s s2detach s3insert s1c
permutation s2snitch s1b s1s s2detach(s1cancel) s3brr s3insert s3commit s1cancel s1c
permutation s2snitch s1b s1s s2detach s3brr s3insert s3commit s1cancel(s2detach) s1c
permutation s2snitch s1b s1s s2detach s3brr s3insert s3commit s1c
# Try one where we VACUUM FREEZE pg_inherits (to verify that xmin change is
# handled correctly).
permutation s2snitch s1brr s1s s2detach(s1cancel) s1cancel s1noop s3vacfreeze s1s s1insert s1c
permutation s2snitch s1b s1s s2detach(s1cancel) s1cancel s1noop s3vacfreeze s1s s1insert s1c
permutation s2snitch s1brr s1s s2detach s1cancel(s2detach) s1noop s3vacfreeze s1s s1insert s1c
permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1noop s3vacfreeze s1s s1insert s1c