From 4e54c1525dee16ec16b061543104215a350ff678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Tue, 25 Jun 2019 12:15:36 +0200 Subject: [PATCH] Isolation tests: consistently name COMMIT '-commit' --- ...olation_distributed_deadlock_detection.out | 148 +++++++++--------- .../isolation_replace_wait_function.out | 8 +- .../expected/isolation_select_for_update.out | 78 ++++----- ...lation_distributed_deadlock_detection.spec | 46 +++--- .../isolation_replace_wait_function.spec | 6 +- .../specs/isolation_select_for_update.spec | 30 ++-- 6 files changed, 158 insertions(+), 158 deletions(-) diff --git a/src/test/regress/expected/isolation_distributed_deadlock_detection.out b/src/test/regress/expected/isolation_distributed_deadlock_detection.out index 6921743c6..182ad05c1 100644 --- a/src/test/regress/expected/isolation_distributed_deadlock_detection.out +++ b/src/test/regress/expected/isolation_distributed_deadlock_detection.out @@ -1,6 +1,6 @@ Parsed test spec with 7 sessions -starting permutation: s1-begin s2-begin s1-update-1 s2-update-2 s2-update-1 deadlock-checker-call s1-update-2 deadlock-checker-call s1-finish s2-finish +starting permutation: s1-begin s2-begin s1-update-1 s2-update-2 s2-update-1 deadlock-checker-call s1-update-2 deadlock-checker-call s1-commit s2-commit step s1-begin: BEGIN; @@ -34,14 +34,14 @@ t step s2-update-1: <... completed> step s1-update-2: <... completed> error in steps deadlock-checker-call s2-update-1 s1-update-2: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s1-finish: +step s1-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; -starting permutation: s1-begin s2-begin s1-update-1-rep-2 s2-update-2-rep-2 s2-update-1-rep-2 deadlock-checker-call s1-update-2-rep-2 deadlock-checker-call s1-finish s2-finish +starting permutation: s1-begin s2-begin s1-update-1-rep-2 s2-update-2-rep-2 s2-update-1-rep-2 deadlock-checker-call s1-update-2-rep-2 deadlock-checker-call s1-commit s2-commit step s1-begin: BEGIN; @@ -75,14 +75,14 @@ t step s2-update-1-rep-2: <... completed> step s1-update-2-rep-2: <... completed> error in steps deadlock-checker-call s2-update-1-rep-2 s1-update-2-rep-2: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s1-finish: +step s1-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; -starting permutation: s1-begin s2-begin s1-set-2pc s2-set-2pc s1-update-1 s2-update-2 s2-update-1 deadlock-checker-call s1-update-2 deadlock-checker-call s1-finish s2-finish +starting permutation: s1-begin s2-begin s1-set-2pc s2-set-2pc s1-update-1 s2-update-2 s2-update-1 deadlock-checker-call s1-update-2 deadlock-checker-call s1-commit s2-commit step s1-begin: BEGIN; @@ -122,14 +122,14 @@ t step s2-update-1: <... completed> step s1-update-2: <... completed> error in steps deadlock-checker-call s2-update-1 s1-update-2: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s1-finish: +step s1-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; -starting permutation: s1-begin s2-begin s1-update-1 s2-update-2 s1-update-2 deadlock-checker-call s2-upsert-select-all deadlock-checker-call s1-finish s2-finish +starting permutation: s1-begin s2-begin s1-update-1 s2-update-2 s1-update-2 deadlock-checker-call s2-upsert-select-all deadlock-checker-call s1-commit s2-commit step s1-begin: BEGIN; @@ -163,14 +163,14 @@ t step s1-update-2: <... completed> step s2-upsert-select-all: <... completed> error in steps deadlock-checker-call s1-update-2 s2-upsert-select-all: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s1-finish: +step s1-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; -starting permutation: s1-begin s2-begin s1-update-1 s2-update-2 s1-update-2 deadlock-checker-call s2-ddl deadlock-checker-call s1-finish s2-finish +starting permutation: s1-begin s2-begin s1-update-1 s2-update-2 s1-update-2 deadlock-checker-call s2-ddl deadlock-checker-call s1-commit s2-commit step s1-begin: BEGIN; @@ -204,14 +204,14 @@ t step s1-update-2: <... completed> step s2-ddl: <... completed> error in steps deadlock-checker-call s1-update-2 s2-ddl: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s1-finish: +step s1-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; -starting permutation: s1-begin s2-begin s1-insert-dist-10 s2-insert-local-10 s2-insert-dist-10 s1-insert-local-10 deadlock-checker-call s1-finish s2-finish +starting permutation: s1-begin s2-begin s1-insert-dist-10 s2-insert-local-10 s2-insert-dist-10 s1-insert-local-10 deadlock-checker-call s1-commit s2-commit step s1-begin: BEGIN; @@ -239,14 +239,14 @@ t step s2-insert-dist-10: <... completed> step s1-insert-local-10: <... completed> error in steps deadlock-checker-call s2-insert-dist-10 s1-insert-local-10: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s1-finish: +step s1-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; -starting permutation: s1-begin s2-begin s2-insert-ref-10 s1-insert-ref-11 s2-insert-ref-11 s1-insert-ref-10 deadlock-checker-call s1-finish s2-finish +starting permutation: s1-begin s2-begin s2-insert-ref-10 s1-insert-ref-11 s2-insert-ref-11 s1-insert-ref-10 deadlock-checker-call s1-commit s2-commit step s1-begin: BEGIN; @@ -274,14 +274,14 @@ t step s2-insert-ref-11: <... completed> step s1-insert-ref-10: <... completed> error in steps deadlock-checker-call s2-insert-ref-11 s1-insert-ref-10: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s1-finish: +step s1-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; -starting permutation: s1-begin s2-begin s2-insert-ref-10 s1-update-1 deadlock-checker-call s2-update-1 s1-insert-ref-10 deadlock-checker-call s1-finish s2-finish +starting permutation: s1-begin s2-begin s2-insert-ref-10 s1-update-1 deadlock-checker-call s2-update-1 s1-insert-ref-10 deadlock-checker-call s1-commit s2-commit step s1-begin: BEGIN; @@ -315,14 +315,14 @@ t step s2-update-1: <... completed> step s1-insert-ref-10: <... completed> error in steps deadlock-checker-call s2-update-1 s1-insert-ref-10: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s1-finish: +step s1-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; -starting permutation: s1-begin s2-begin s3-begin s1-update-1 s2-update-2 s3-update-3 deadlock-checker-call s1-update-2 s2-update-3 s3-update-1 deadlock-checker-call s3-finish s2-finish s1-finish +starting permutation: s1-begin s2-begin s3-begin s1-update-1 s2-update-2 s3-update-3 deadlock-checker-call s1-update-2 s2-update-3 s3-update-1 deadlock-checker-call s3-commit s2-commit s1-commit step s1-begin: BEGIN; @@ -365,18 +365,18 @@ t step s2-update-3: <... completed> step s3-update-1: <... completed> error in steps deadlock-checker-call s2-update-3 s3-update-1: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s3-finish: +step s3-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; step s1-update-2: <... completed> -step s1-finish: +step s1-commit: COMMIT; -starting permutation: s1-begin s2-begin s3-begin s2-update-1 s1-update-1 s2-update-2 s3-update-3 s3-update-2 deadlock-checker-call s2-update-3 deadlock-checker-call s3-finish s2-finish s1-finish +starting permutation: s1-begin s2-begin s3-begin s2-update-1 s1-update-1 s2-update-2 s3-update-3 s3-update-2 deadlock-checker-call s2-update-3 deadlock-checker-call s3-commit s2-commit s1-commit step s1-begin: BEGIN; @@ -419,18 +419,18 @@ t step s3-update-2: <... completed> step s2-update-3: <... completed> error in steps deadlock-checker-call s3-update-2 s2-update-3: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s3-finish: +step s3-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; step s1-update-1: <... completed> -step s1-finish: +step s1-commit: COMMIT; -starting permutation: s1-begin s2-begin s3-begin s4-begin s1-update-1 s2-update-2 s3-update-3 s3-update-2 deadlock-checker-call s4-update-4 s2-update-3 deadlock-checker-call s3-finish s2-finish s1-finish s4-finish +starting permutation: s1-begin s2-begin s3-begin s4-begin s1-update-1 s2-update-2 s3-update-3 s3-update-2 deadlock-checker-call s4-update-4 s2-update-3 deadlock-checker-call s3-commit s2-commit s1-commit s4-commit step s1-begin: BEGIN; @@ -476,20 +476,20 @@ t step s3-update-2: <... completed> step s2-update-3: <... completed> error in steps deadlock-checker-call s3-update-2 s2-update-3: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s3-finish: +step s3-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; -step s1-finish: +step s1-commit: COMMIT; -step s4-finish: +step s4-commit: COMMIT; -starting permutation: s1-begin s2-begin s3-begin s4-begin s4-update-1 s1-update-1 deadlock-checker-call s2-update-2 s3-update-3 s2-update-3 s3-update-2 deadlock-checker-call s3-finish s2-finish s4-finish s1-finish +starting permutation: s1-begin s2-begin s3-begin s4-begin s4-update-1 s1-update-1 deadlock-checker-call s2-update-2 s3-update-3 s2-update-3 s3-update-2 deadlock-checker-call s3-commit s2-commit s4-commit s1-commit step s1-begin: BEGIN; @@ -535,21 +535,21 @@ t step s2-update-3: <... completed> step s3-update-2: <... completed> error in steps deadlock-checker-call s2-update-3 s3-update-2: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s3-finish: +step s3-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; -step s4-finish: +step s4-commit: COMMIT; step s1-update-1: <... completed> -step s1-finish: +step s1-commit: COMMIT; -starting permutation: s1-begin s2-begin s3-begin s4-begin s1-update-1 s4-update-4 s2-update-2 s3-update-3 s3-update-2 s4-update-1 s1-update-4 deadlock-checker-call s1-finish s4-finish s2-update-3 deadlock-checker-call s2-finish s3-finish +starting permutation: s1-begin s2-begin s3-begin s4-begin s1-update-1 s4-update-4 s2-update-2 s3-update-3 s3-update-2 s4-update-1 s1-update-4 deadlock-checker-call s1-commit s4-commit s2-update-3 deadlock-checker-call s2-commit s3-commit step s1-begin: BEGIN; @@ -592,10 +592,10 @@ t step s4-update-1: <... completed> step s1-update-4: <... completed> error in steps deadlock-checker-call s4-update-1 s1-update-4: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s1-finish: +step s1-commit: COMMIT; -step s4-finish: +step s4-commit: COMMIT; step s2-update-3: @@ -610,14 +610,14 @@ t step s3-update-2: <... completed> step s2-update-3: <... completed> error in steps deadlock-checker-call s3-update-2 s2-update-3: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s2-finish: +step s2-commit: COMMIT; -step s3-finish: +step s3-commit: COMMIT; -starting permutation: s1-begin s2-begin s3-begin s4-begin s5-begin s6-begin s1-update-1 s5-update-5 s3-update-2 s2-update-3 s4-update-4 s3-update-4 deadlock-checker-call s6-update-6 s4-update-6 s1-update-5 s5-update-1 deadlock-checker-call s1-finish s5-finish s6-finish s4-finish s3-finish s2-finish +starting permutation: s1-begin s2-begin s3-begin s4-begin s5-begin s6-begin s1-update-1 s5-update-5 s3-update-2 s2-update-3 s4-update-4 s3-update-4 deadlock-checker-call s6-update-6 s4-update-6 s1-update-5 s5-update-1 deadlock-checker-call s1-commit s5-commit s6-commit s4-commit s3-commit s2-commit step s1-begin: BEGIN; @@ -681,28 +681,28 @@ t step s1-update-5: <... completed> step s5-update-1: <... completed> error in steps deadlock-checker-call s1-update-5 s5-update-1: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s1-finish: +step s1-commit: COMMIT; -step s5-finish: +step s5-commit: COMMIT; -step s6-finish: +step s6-commit: COMMIT; step s4-update-6: <... completed> -step s4-finish: +step s4-commit: COMMIT; step s3-update-4: <... completed> -step s3-finish: +step s3-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; -starting permutation: s1-begin s2-begin s3-begin s4-begin s5-begin s6-begin s6-update-6 s5-update-5 s5-update-6 s4-update-4 s1-update-4 s4-update-5 deadlock-checker-call s2-update-3 s3-update-2 s2-update-2 s3-update-3 deadlock-checker-call s6-finish s5-finish s4-finish s1-finish s3-finish s2-finish +starting permutation: s1-begin s2-begin s3-begin s4-begin s5-begin s6-begin s6-update-6 s5-update-5 s5-update-6 s4-update-4 s1-update-4 s4-update-5 deadlock-checker-call s2-update-3 s3-update-2 s2-update-2 s3-update-3 deadlock-checker-call s6-commit s5-commit s4-commit s1-commit s3-commit s2-commit step s1-begin: BEGIN; @@ -766,29 +766,29 @@ t step s2-update-2: <... completed> step s3-update-3: <... completed> error in steps deadlock-checker-call s2-update-2 s3-update-3: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s6-finish: +step s6-commit: COMMIT; step s5-update-6: <... completed> -step s5-finish: +step s5-commit: COMMIT; step s4-update-5: <... completed> -step s4-finish: +step s4-commit: COMMIT; step s1-update-4: <... completed> -step s1-finish: +step s1-commit: COMMIT; -step s3-finish: +step s3-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; -starting permutation: s1-begin s2-begin s3-begin s4-begin s5-begin s6-begin s5-update-5 s3-update-2 s2-update-2 s4-update-4 s3-update-4 s4-update-5 s1-update-4 deadlock-checker-call s6-update-6 s5-update-6 s6-update-5 deadlock-checker-call s5-finish s6-finish s4-finish s3-finish s1-finish s2-finish +starting permutation: s1-begin s2-begin s3-begin s4-begin s5-begin s6-begin s5-update-5 s3-update-2 s2-update-2 s4-update-4 s3-update-4 s4-update-5 s1-update-4 deadlock-checker-call s6-update-6 s5-update-6 s6-update-5 deadlock-checker-call s5-commit s6-commit s4-commit s3-commit s1-commit s2-commit step s1-begin: BEGIN; @@ -852,30 +852,30 @@ t step s5-update-6: <... completed> step s6-update-5: <... completed> error in steps deadlock-checker-call s5-update-6 s6-update-5: ERROR: canceling the transaction since it was involved in a distributed deadlock -step s5-finish: +step s5-commit: COMMIT; step s4-update-5: <... completed> -step s6-finish: +step s6-commit: COMMIT; -step s4-finish: +step s4-commit: COMMIT; step s3-update-4: <... completed> -step s3-finish: +step s3-commit: COMMIT; step s2-update-2: <... completed> step s1-update-4: <... completed> -step s1-finish: +step s1-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; -starting permutation: s1-begin s2-begin s3-begin s4-begin s5-begin s1-update-1 s3-update-3 s2-update-4 s2-update-3 s4-update-2 s5-random-adv-lock s4-random-adv-lock s3-update-1 s1-update-2-4 deadlock-checker-call deadlock-checker-call s5-finish s4-finish s2-finish s1-finish s3-finish +starting permutation: s1-begin s2-begin s3-begin s4-begin s5-begin s1-update-1 s3-update-3 s2-update-4 s2-update-3 s4-update-2 s5-random-adv-lock s4-random-adv-lock s3-update-1 s1-update-2-4 deadlock-checker-call deadlock-checker-call s5-commit s4-commit s2-commit s1-commit s3-commit step s1-begin: BEGIN; @@ -935,24 +935,24 @@ step deadlock-checker-call: check_distributed_deadlocks f -step s5-finish: +step s5-commit: COMMIT; step s4-random-adv-lock: <... completed> pg_advisory_xact_lock -step s4-finish: +step s4-commit: COMMIT; step s1-update-2-4: <... completed> -step s2-finish: +step s2-commit: COMMIT; -step s1-finish: +step s1-commit: COMMIT; step s3-update-1: <... completed> -step s3-finish: +step s3-commit: COMMIT; diff --git a/src/test/regress/expected/isolation_replace_wait_function.out b/src/test/regress/expected/isolation_replace_wait_function.out index ac2c36096..48d2ef1ee 100644 --- a/src/test/regress/expected/isolation_replace_wait_function.out +++ b/src/test/regress/expected/isolation_replace_wait_function.out @@ -1,6 +1,6 @@ Parsed test spec with 2 sessions -starting permutation: s1-insert-1 s2-insert s1-finish s2-finish +starting permutation: s1-insert-1 s2-insert s1-commit s2-commit create_distributed_table @@ -12,12 +12,12 @@ step s2-insert: BEGIN; INSERT INTO test_locking (a) VALUES (1); -step s1-finish: +step s1-commit: COMMIT; step s2-insert: <... completed> -error in steps s1-finish s2-insert: ERROR: duplicate key value violates unique constraint "test_locking_a_key_102337" -step s2-finish: +error in steps s1-commit s2-insert: ERROR: duplicate key value violates unique constraint "test_locking_a_key_102337" +step s2-commit: COMMIT; restore_isolation_tester_func diff --git a/src/test/regress/expected/isolation_select_for_update.out b/src/test/regress/expected/isolation_select_for_update.out index d986c2d19..c1d655d60 100644 --- a/src/test/regress/expected/isolation_select_for_update.out +++ b/src/test/regress/expected/isolation_select_for_update.out @@ -1,6 +1,6 @@ Parsed test spec with 2 sessions -starting permutation: s1-begin s1-select-from-t1-t2-for-update s2-begin s2-update-t1 s1-finish s2-finish +starting permutation: s1-begin s1-select-from-t1-t2-for-update s2-begin s2-update-t1 s1-commit s2-commit step s1-begin: BEGIN; @@ -20,18 +20,18 @@ step s2-begin: step s2-update-t1: UPDATE test_table_1_rf1 SET val_1 = 5 WHERE id = 1; -step s1-finish: +step s1-commit: COMMIT; step s2-update-t1: <... completed> -step s2-finish: +step s2-commit: COMMIT; restore_isolation_tester_func -starting permutation: s1-begin s1-select-from-t1-t2-for-share s2-begin s2-delete-t1 s1-finish s2-finish +starting permutation: s1-begin s1-select-from-t1-t2-for-share s2-begin s2-delete-t1 s1-commit s2-commit step s1-begin: BEGIN; @@ -51,18 +51,18 @@ step s2-begin: step s2-delete-t1: DELETE FROM test_table_1_rf1 WHERE id = 1; -step s1-finish: +step s1-commit: COMMIT; step s2-delete-t1: <... completed> -step s2-finish: +step s2-commit: COMMIT; restore_isolation_tester_func -starting permutation: s1-begin s1-select-from-t1-rt-for-update s2-begin s2-update-t1 s1-finish s2-finish +starting permutation: s1-begin s1-select-from-t1-rt-for-update s2-begin s2-update-t1 s1-commit s2-commit step s1-begin: BEGIN; @@ -82,18 +82,18 @@ step s2-begin: step s2-update-t1: UPDATE test_table_1_rf1 SET val_1 = 5 WHERE id = 1; -step s1-finish: +step s1-commit: COMMIT; step s2-update-t1: <... completed> -step s2-finish: +step s2-commit: COMMIT; restore_isolation_tester_func -starting permutation: s1-begin s1-select-from-t1-rt-with-lc-for-update s2-begin s2-update-rt s1-finish s2-finish +starting permutation: s1-begin s1-select-from-t1-rt-with-lc-for-update s2-begin s2-update-rt s1-commit s2-commit step s1-begin: BEGIN; @@ -114,18 +114,18 @@ step s2-begin: step s2-update-rt: UPDATE ref_table SET val_1 = 5 WHERE id = 1; -step s1-finish: +step s1-commit: COMMIT; step s2-update-rt: <... completed> -step s2-finish: +step s2-commit: COMMIT; restore_isolation_tester_func -starting permutation: s1-begin s1-select-from-t1-rt-with-lc-for-update s2-begin s2-update-t1 s1-finish s2-finish +starting permutation: s1-begin s1-select-from-t1-rt-with-lc-for-update s2-begin s2-update-t1 s1-commit s2-commit step s1-begin: BEGIN; @@ -146,17 +146,17 @@ step s2-begin: step s2-update-t1: UPDATE test_table_1_rf1 SET val_1 = 5 WHERE id = 1; -step s1-finish: +step s1-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; restore_isolation_tester_func -starting permutation: s1-begin s1-select-from-t1-t2-for-share s2-begin s2-select-from-t1-t2-for-share s1-finish s2-finish +starting permutation: s1-begin s1-select-from-t1-t2-for-share s2-begin s2-select-from-t1-t2-for-share s1-commit s2-commit step s1-begin: BEGIN; @@ -183,17 +183,17 @@ step s2-select-from-t1-t2-for-share: id val_1 id val_1 1 2 1 2 -step s1-finish: +step s1-commit: COMMIT; -step s2-finish: +step s2-commit: COMMIT; restore_isolation_tester_func -starting permutation: s1-begin s1-select-from-t1-rt-for-update s2-begin s2-select-from-t1-t2-for-update s1-finish s2-finish +starting permutation: s1-begin s1-select-from-t1-rt-for-update s2-begin s2-select-from-t1-t2-for-update s1-commit s2-commit step s1-begin: BEGIN; @@ -217,21 +217,21 @@ step s2-select-from-t1-t2-for-update: ORDER BY 1 FOR UPDATE; -step s1-finish: +step s1-commit: COMMIT; step s2-select-from-t1-t2-for-update: <... completed> id val_1 id val_1 1 2 1 2 -step s2-finish: +step s2-commit: COMMIT; restore_isolation_tester_func -starting permutation: s1-begin s1-select-from-t1-within-cte s2-begin s2-select-from-t1-t2-for-update s1-finish s2-finish +starting permutation: s1-begin s1-select-from-t1-within-cte s2-begin s2-select-from-t1-t2-for-update s1-commit s2-commit step s1-begin: BEGIN; @@ -252,21 +252,21 @@ step s2-select-from-t1-t2-for-update: ORDER BY 1 FOR UPDATE; -step s1-finish: +step s1-commit: COMMIT; step s2-select-from-t1-t2-for-update: <... completed> id val_1 id val_1 1 2 1 2 -step s2-finish: +step s2-commit: COMMIT; restore_isolation_tester_func -starting permutation: s1-begin s1-select-from-t1-within-cte s2-begin s2-update-t1 s1-finish s2-finish +starting permutation: s1-begin s1-select-from-t1-within-cte s2-begin s2-update-t1 s1-commit s2-commit step s1-begin: BEGIN; @@ -283,18 +283,18 @@ step s2-begin: step s2-update-t1: UPDATE test_table_1_rf1 SET val_1 = 5 WHERE id = 1; -step s1-finish: +step s1-commit: COMMIT; step s2-update-t1: <... completed> -step s2-finish: +step s2-commit: COMMIT; restore_isolation_tester_func -starting permutation: s1-begin s1-select-from-t1-with-subquery s2-begin s2-update-t1 s1-finish s2-finish +starting permutation: s1-begin s1-select-from-t1-with-subquery s2-begin s2-update-t1 s1-commit s2-commit step s1-begin: BEGIN; @@ -310,18 +310,18 @@ step s2-begin: step s2-update-t1: UPDATE test_table_1_rf1 SET val_1 = 5 WHERE id = 1; -step s1-finish: +step s1-commit: COMMIT; step s2-update-t1: <... completed> -step s2-finish: +step s2-commit: COMMIT; restore_isolation_tester_func -starting permutation: s1-begin s1-select-from-rt-with-subquery s2-begin s2-update-rt s1-finish s2-finish +starting permutation: s1-begin s1-select-from-rt-with-subquery s2-begin s2-update-rt s1-commit s2-commit step s1-begin: BEGIN; @@ -337,18 +337,18 @@ step s2-begin: step s2-update-rt: UPDATE ref_table SET val_1 = 5 WHERE id = 1; -step s1-finish: +step s1-commit: COMMIT; step s2-update-rt: <... completed> -step s2-finish: +step s2-commit: COMMIT; restore_isolation_tester_func -starting permutation: s1-begin s1-select-from-t1-with-view s2-begin s2-update-t1 s1-finish s2-finish +starting permutation: s1-begin s1-select-from-t1-with-view s2-begin s2-update-t1 s1-commit s2-commit step s1-begin: BEGIN; @@ -364,18 +364,18 @@ step s2-begin: step s2-update-t1: UPDATE test_table_1_rf1 SET val_1 = 5 WHERE id = 1; -step s1-finish: +step s1-commit: COMMIT; step s2-update-t1: <... completed> -step s2-finish: +step s2-commit: COMMIT; restore_isolation_tester_func -starting permutation: s1-begin s1-update-rt-with-cte-select-from-rt s2-begin s2-update-rt s1-finish s2-finish +starting permutation: s1-begin s1-update-rt-with-cte-select-from-rt s2-begin s2-update-rt s1-commit s2-commit step s1-begin: BEGIN; @@ -389,11 +389,11 @@ step s2-begin: step s2-update-rt: UPDATE ref_table SET val_1 = 5 WHERE id = 1; -step s1-finish: +step s1-commit: COMMIT; step s2-update-rt: <... completed> -step s2-finish: +step s2-commit: COMMIT; restore_isolation_tester_func diff --git a/src/test/regress/specs/isolation_distributed_deadlock_detection.spec b/src/test/regress/specs/isolation_distributed_deadlock_detection.spec index d860803ce..f93355207 100644 --- a/src/test/regress/specs/isolation_distributed_deadlock_detection.spec +++ b/src/test/regress/specs/isolation_distributed_deadlock_detection.spec @@ -102,7 +102,7 @@ step "s1-update-2-4" UPDATE deadlock_detection_test SET some_val = 1 WHERE user_id = 2 OR user_id = 4; } -step "s1-finish" +step "s1-commit" { COMMIT; } @@ -180,7 +180,7 @@ step "s2-insert-ref-11" } -step "s2-finish" +step "s2-commit" { COMMIT; } @@ -212,7 +212,7 @@ step "s3-update-4" UPDATE deadlock_detection_test SET some_val = 3 WHERE user_id = 4; } -step "s3-finish" +step "s3-commit" { COMMIT; } @@ -264,7 +264,7 @@ step "s4-random-adv-lock" SELECT pg_advisory_xact_lock(8765); } -step "s4-finish" +step "s4-commit" { COMMIT; } @@ -316,7 +316,7 @@ step "s5-random-adv-lock" SELECT pg_advisory_xact_lock(8765); } -step "s5-finish" +step "s5-commit" { COMMIT; } @@ -363,7 +363,7 @@ step "s6-update-7" UPDATE deadlock_detection_test SET some_val = 6 WHERE user_id = 7; } -step "s6-finish" +step "s6-commit" { COMMIT; } @@ -380,52 +380,52 @@ step "deadlock-checker-call" } # simplest case, loop with two nodes -permutation "s1-begin" "s2-begin" "s1-update-1" "s2-update-2" "s2-update-1" "deadlock-checker-call" "s1-update-2" "deadlock-checker-call" "s1-finish" "s2-finish" +permutation "s1-begin" "s2-begin" "s1-update-1" "s2-update-2" "s2-update-1" "deadlock-checker-call" "s1-update-2" "deadlock-checker-call" "s1-commit" "s2-commit" # simplest case with replication factor 2 -permutation "s1-begin" "s2-begin" "s1-update-1-rep-2" "s2-update-2-rep-2" "s2-update-1-rep-2" "deadlock-checker-call" "s1-update-2-rep-2" "deadlock-checker-call" "s1-finish" "s2-finish" +permutation "s1-begin" "s2-begin" "s1-update-1-rep-2" "s2-update-2-rep-2" "s2-update-1-rep-2" "deadlock-checker-call" "s1-update-2-rep-2" "deadlock-checker-call" "s1-commit" "s2-commit" # simplest case with 2pc enabled -permutation "s1-begin" "s2-begin" "s1-set-2pc" "s2-set-2pc" "s1-update-1" "s2-update-2" "s2-update-1" "deadlock-checker-call" "s1-update-2" "deadlock-checker-call" "s1-finish" "s2-finish" +permutation "s1-begin" "s2-begin" "s1-set-2pc" "s2-set-2pc" "s1-update-1" "s2-update-2" "s2-update-1" "deadlock-checker-call" "s1-update-2" "deadlock-checker-call" "s1-commit" "s2-commit" # simplest case with multi-shard query is cancelled -permutation "s1-begin" "s2-begin" "s1-update-1" "s2-update-2" "s1-update-2" "deadlock-checker-call" "s2-upsert-select-all" "deadlock-checker-call" "s1-finish" "s2-finish" +permutation "s1-begin" "s2-begin" "s1-update-1" "s2-update-2" "s1-update-2" "deadlock-checker-call" "s2-upsert-select-all" "deadlock-checker-call" "s1-commit" "s2-commit" # simplest case with DDL is cancelled -permutation "s1-begin" "s2-begin" "s1-update-1" "s2-update-2" "s1-update-2" "deadlock-checker-call" "s2-ddl" "deadlock-checker-call" "s1-finish" "s2-finish" +permutation "s1-begin" "s2-begin" "s1-update-1" "s2-update-2" "s1-update-2" "deadlock-checker-call" "s2-ddl" "deadlock-checker-call" "s1-commit" "s2-commit" # daedlock with local table -permutation "s1-begin" "s2-begin" "s1-insert-dist-10" "s2-insert-local-10" "s2-insert-dist-10" "s1-insert-local-10" "deadlock-checker-call" "s1-finish" "s2-finish" +permutation "s1-begin" "s2-begin" "s1-insert-dist-10" "s2-insert-local-10" "s2-insert-dist-10" "s1-insert-local-10" "deadlock-checker-call" "s1-commit" "s2-commit" # daedlock with reference tables only -permutation "s1-begin" "s2-begin" "s2-insert-ref-10" "s1-insert-ref-11" "s2-insert-ref-11" "s1-insert-ref-10" "deadlock-checker-call" "s1-finish" "s2-finish" +permutation "s1-begin" "s2-begin" "s2-insert-ref-10" "s1-insert-ref-11" "s2-insert-ref-11" "s1-insert-ref-10" "deadlock-checker-call" "s1-commit" "s2-commit" # deadlock with referecen + distributed tables -permutation "s1-begin" "s2-begin" "s2-insert-ref-10" "s1-update-1" "deadlock-checker-call" "s2-update-1" "s1-insert-ref-10" "deadlock-checker-call" "s1-finish" "s2-finish" +permutation "s1-begin" "s2-begin" "s2-insert-ref-10" "s1-update-1" "deadlock-checker-call" "s2-update-1" "s1-insert-ref-10" "deadlock-checker-call" "s1-commit" "s2-commit" # slightly more complex case, loop with three nodes -permutation "s1-begin" "s2-begin" "s3-begin" "s1-update-1" "s2-update-2" "s3-update-3" "deadlock-checker-call" "s1-update-2" "s2-update-3" "s3-update-1" "deadlock-checker-call" "s3-finish" "s2-finish" "s1-finish" +permutation "s1-begin" "s2-begin" "s3-begin" "s1-update-1" "s2-update-2" "s3-update-3" "deadlock-checker-call" "s1-update-2" "s2-update-3" "s3-update-1" "deadlock-checker-call" "s3-commit" "s2-commit" "s1-commit" # similar to the above (i.e., 3 nodes), but the cycle starts from the second node -permutation "s1-begin" "s2-begin" "s3-begin" "s2-update-1" "s1-update-1" "s2-update-2" "s3-update-3" "s3-update-2" "deadlock-checker-call" "s2-update-3" "deadlock-checker-call" "s3-finish" "s2-finish" "s1-finish" +permutation "s1-begin" "s2-begin" "s3-begin" "s2-update-1" "s1-update-1" "s2-update-2" "s3-update-3" "s3-update-2" "deadlock-checker-call" "s2-update-3" "deadlock-checker-call" "s3-commit" "s2-commit" "s1-commit" # not connected graph -permutation "s1-begin" "s2-begin" "s3-begin" "s4-begin" "s1-update-1" "s2-update-2" "s3-update-3" "s3-update-2" "deadlock-checker-call" "s4-update-4" "s2-update-3" "deadlock-checker-call" "s3-finish" "s2-finish" "s1-finish" "s4-finish" +permutation "s1-begin" "s2-begin" "s3-begin" "s4-begin" "s1-update-1" "s2-update-2" "s3-update-3" "s3-update-2" "deadlock-checker-call" "s4-update-4" "s2-update-3" "deadlock-checker-call" "s3-commit" "s2-commit" "s1-commit" "s4-commit" # still a not connected graph, but each smaller graph contains dependencies, one of which is a distributed deadlock -permutation "s1-begin" "s2-begin" "s3-begin" "s4-begin" "s4-update-1" "s1-update-1" "deadlock-checker-call" "s2-update-2" "s3-update-3" "s2-update-3" "s3-update-2" "deadlock-checker-call" "s3-finish" "s2-finish" "s4-finish" "s1-finish" +permutation "s1-begin" "s2-begin" "s3-begin" "s4-begin" "s4-update-1" "s1-update-1" "deadlock-checker-call" "s2-update-2" "s3-update-3" "s2-update-3" "s3-update-2" "deadlock-checker-call" "s3-commit" "s2-commit" "s4-commit" "s1-commit" # multiple deadlocks on a not connected graph -permutation "s1-begin" "s2-begin" "s3-begin" "s4-begin" "s1-update-1" "s4-update-4" "s2-update-2" "s3-update-3" "s3-update-2" "s4-update-1" "s1-update-4" "deadlock-checker-call" "s1-finish" "s4-finish" "s2-update-3" "deadlock-checker-call" "s2-finish" "s3-finish" +permutation "s1-begin" "s2-begin" "s3-begin" "s4-begin" "s1-update-1" "s4-update-4" "s2-update-2" "s3-update-3" "s3-update-2" "s4-update-1" "s1-update-4" "deadlock-checker-call" "s1-commit" "s4-commit" "s2-update-3" "deadlock-checker-call" "s2-commit" "s3-commit" # a larger graph where the first node is in the distributed deadlock -permutation "s1-begin" "s2-begin" "s3-begin" "s4-begin" "s5-begin" "s6-begin" "s1-update-1" "s5-update-5" "s3-update-2" "s2-update-3" "s4-update-4" "s3-update-4" "deadlock-checker-call" "s6-update-6" "s4-update-6" "s1-update-5" "s5-update-1" "deadlock-checker-call" "s1-finish" "s5-finish" "s6-finish" "s4-finish" "s3-finish" "s2-finish" +permutation "s1-begin" "s2-begin" "s3-begin" "s4-begin" "s5-begin" "s6-begin" "s1-update-1" "s5-update-5" "s3-update-2" "s2-update-3" "s4-update-4" "s3-update-4" "deadlock-checker-call" "s6-update-6" "s4-update-6" "s1-update-5" "s5-update-1" "deadlock-checker-call" "s1-commit" "s5-commit" "s6-commit" "s4-commit" "s3-commit" "s2-commit" # a larger graph where the deadlock starts from a middle node -permutation "s1-begin" "s2-begin" "s3-begin" "s4-begin" "s5-begin" "s6-begin" "s6-update-6" "s5-update-5" "s5-update-6" "s4-update-4" "s1-update-4" "s4-update-5" "deadlock-checker-call" "s2-update-3" "s3-update-2" "s2-update-2" "s3-update-3" "deadlock-checker-call" "s6-finish" "s5-finish" "s4-finish" "s1-finish" "s3-finish" "s2-finish" +permutation "s1-begin" "s2-begin" "s3-begin" "s4-begin" "s5-begin" "s6-begin" "s6-update-6" "s5-update-5" "s5-update-6" "s4-update-4" "s1-update-4" "s4-update-5" "deadlock-checker-call" "s2-update-3" "s3-update-2" "s2-update-2" "s3-update-3" "deadlock-checker-call" "s6-commit" "s5-commit" "s4-commit" "s1-commit" "s3-commit" "s2-commit" # a larger graph where the deadlock starts from the last node -permutation "s1-begin" "s2-begin" "s3-begin" "s4-begin" "s5-begin" "s6-begin" "s5-update-5" "s3-update-2" "s2-update-2" "s4-update-4" "s3-update-4" "s4-update-5" "s1-update-4" "deadlock-checker-call" "s6-update-6" "s5-update-6" "s6-update-5" "deadlock-checker-call" "s5-finish" "s6-finish" "s4-finish" "s3-finish" "s1-finish" "s2-finish" +permutation "s1-begin" "s2-begin" "s3-begin" "s4-begin" "s5-begin" "s6-begin" "s5-update-5" "s3-update-2" "s2-update-2" "s4-update-4" "s3-update-4" "s4-update-5" "s1-update-4" "deadlock-checker-call" "s6-update-6" "s5-update-6" "s6-update-5" "deadlock-checker-call" "s5-commit" "s6-commit" "s4-commit" "s3-commit" "s1-commit" "s2-commit" # a backend is blocked on multiple backends # note that session 5 is not strictly necessary to simulate the deadlock @@ -433,4 +433,4 @@ permutation "s1-begin" "s2-begin" "s3-begin" "s4-begin" "s5-begin" "s6-begin" "s # thus if any cancellation happens on session 4, we'd be able to # observe it, otherwise cancelling idle backends has not affect # (cancelling wrong backend used to be a bug and already fixed) -permutation "s1-begin" "s2-begin" "s3-begin" "s4-begin" "s5-begin" "s1-update-1" "s3-update-3" "s2-update-4" "s2-update-3" "s4-update-2" "s5-random-adv-lock" "s4-random-adv-lock" "s3-update-1" "s1-update-2-4" "deadlock-checker-call" "deadlock-checker-call" "s5-finish" "s4-finish" "s2-finish" "s1-finish" "s3-finish" +permutation "s1-begin" "s2-begin" "s3-begin" "s4-begin" "s5-begin" "s1-update-1" "s3-update-3" "s2-update-4" "s2-update-3" "s4-update-2" "s5-random-adv-lock" "s4-random-adv-lock" "s3-update-1" "s1-update-2-4" "deadlock-checker-call" "deadlock-checker-call" "s5-commit" "s4-commit" "s2-commit" "s1-commit" "s3-commit" diff --git a/src/test/regress/specs/isolation_replace_wait_function.spec b/src/test/regress/specs/isolation_replace_wait_function.spec index bfce4bbae..6f1b479d6 100644 --- a/src/test/regress/specs/isolation_replace_wait_function.spec +++ b/src/test/regress/specs/isolation_replace_wait_function.spec @@ -26,7 +26,7 @@ step "s1-insert-1" INSERT INTO test_locking (a) VALUES (1); } -step "s1-finish" +step "s1-commit" { COMMIT; } @@ -39,9 +39,9 @@ step "s2-insert" INSERT INTO test_locking (a) VALUES (1); } -step "s2-finish" +step "s2-commit" { COMMIT; } -permutation "s1-insert-1" "s2-insert" "s1-finish" "s2-finish" +permutation "s1-insert-1" "s2-insert" "s1-commit" "s2-commit" diff --git a/src/test/regress/specs/isolation_select_for_update.spec b/src/test/regress/specs/isolation_select_for_update.spec index 658a6c614..7745c3b35 100644 --- a/src/test/regress/specs/isolation_select_for_update.spec +++ b/src/test/regress/specs/isolation_select_for_update.spec @@ -101,7 +101,7 @@ step "s1-select-from-t1-with-view" SELECT * FROM test_1 WHERE id = 1 FOR UPDATE; } -step "s1-finish" +step "s1-commit" { COMMIT; } @@ -146,21 +146,21 @@ step "s2-select-from-t1-t2-for-update" FOR UPDATE; } -step "s2-finish" +step "s2-commit" { COMMIT; } -permutation "s1-begin" "s1-select-from-t1-t2-for-update" "s2-begin" "s2-update-t1" "s1-finish" "s2-finish" -permutation "s1-begin" "s1-select-from-t1-t2-for-share" "s2-begin" "s2-delete-t1" "s1-finish" "s2-finish" -permutation "s1-begin" "s1-select-from-t1-rt-for-update" "s2-begin" "s2-update-t1" "s1-finish" "s2-finish" -permutation "s1-begin" "s1-select-from-t1-rt-with-lc-for-update" "s2-begin" "s2-update-rt" "s1-finish" "s2-finish" -permutation "s1-begin" "s1-select-from-t1-rt-with-lc-for-update" "s2-begin" "s2-update-t1" "s1-finish" "s2-finish" -permutation "s1-begin" "s1-select-from-t1-t2-for-share" "s2-begin" "s2-select-from-t1-t2-for-share" "s1-finish" "s2-finish" -permutation "s1-begin" "s1-select-from-t1-rt-for-update" "s2-begin" "s2-select-from-t1-t2-for-update" "s1-finish" "s2-finish" -permutation "s1-begin" "s1-select-from-t1-within-cte" "s2-begin" "s2-select-from-t1-t2-for-update" "s1-finish" "s2-finish" -permutation "s1-begin" "s1-select-from-t1-within-cte" "s2-begin" "s2-update-t1" "s1-finish" "s2-finish" -permutation "s1-begin" "s1-select-from-t1-with-subquery" "s2-begin" "s2-update-t1" "s1-finish" "s2-finish" -permutation "s1-begin" "s1-select-from-rt-with-subquery" "s2-begin" "s2-update-rt" "s1-finish" "s2-finish" -permutation "s1-begin" "s1-select-from-t1-with-view" "s2-begin" "s2-update-t1" "s1-finish" "s2-finish" -permutation "s1-begin" "s1-update-rt-with-cte-select-from-rt" "s2-begin" "s2-update-rt" "s1-finish" "s2-finish" +permutation "s1-begin" "s1-select-from-t1-t2-for-update" "s2-begin" "s2-update-t1" "s1-commit" "s2-commit" +permutation "s1-begin" "s1-select-from-t1-t2-for-share" "s2-begin" "s2-delete-t1" "s1-commit" "s2-commit" +permutation "s1-begin" "s1-select-from-t1-rt-for-update" "s2-begin" "s2-update-t1" "s1-commit" "s2-commit" +permutation "s1-begin" "s1-select-from-t1-rt-with-lc-for-update" "s2-begin" "s2-update-rt" "s1-commit" "s2-commit" +permutation "s1-begin" "s1-select-from-t1-rt-with-lc-for-update" "s2-begin" "s2-update-t1" "s1-commit" "s2-commit" +permutation "s1-begin" "s1-select-from-t1-t2-for-share" "s2-begin" "s2-select-from-t1-t2-for-share" "s1-commit" "s2-commit" +permutation "s1-begin" "s1-select-from-t1-rt-for-update" "s2-begin" "s2-select-from-t1-t2-for-update" "s1-commit" "s2-commit" +permutation "s1-begin" "s1-select-from-t1-within-cte" "s2-begin" "s2-select-from-t1-t2-for-update" "s1-commit" "s2-commit" +permutation "s1-begin" "s1-select-from-t1-within-cte" "s2-begin" "s2-update-t1" "s1-commit" "s2-commit" +permutation "s1-begin" "s1-select-from-t1-with-subquery" "s2-begin" "s2-update-t1" "s1-commit" "s2-commit" +permutation "s1-begin" "s1-select-from-rt-with-subquery" "s2-begin" "s2-update-rt" "s1-commit" "s2-commit" +permutation "s1-begin" "s1-select-from-t1-with-view" "s2-begin" "s2-update-t1" "s1-commit" "s2-commit" +permutation "s1-begin" "s1-update-rt-with-cte-select-from-rt" "s2-begin" "s2-update-rt" "s1-commit" "s2-commit"