1
- # Simple tests for statement_timeout, lock_timeout and transaction_timeout features
1
+ # Simple tests for statement_timeout and lock_timeout features
2
2
3
3
setup
4
4
{
@@ -27,33 +27,6 @@ step locktbl { LOCK TABLE accounts; }
27
27
step update { DELETE FROM accounts WHERE accountid = 'checking' ; }
28
28
teardown { ABORT ; }
29
29
30
- session s3
31
- step s3_begin { BEGIN ISOLATION LEVEL READ COMMITTED ; }
32
- step stto { SET statement_timeout = '10ms' ; SET transaction_timeout = '1s' ; }
33
- step tsto { SET statement_timeout = '1s' ; SET transaction_timeout = '10ms' ; }
34
- step s3_sleep { SELECT pg_sleep (0.1 ); }
35
- step s3_abort { ABORT ; }
36
-
37
- session s4
38
- step s4_begin { BEGIN ISOLATION LEVEL READ COMMITTED ; }
39
- step itto { SET idle_in_transaction_session_timeout = '10ms' ; SET transaction_timeout = '1s' ; }
40
-
41
- session s5
42
- step s5_begin { BEGIN ISOLATION LEVEL READ COMMITTED ; }
43
- step tito { SET idle_in_transaction_session_timeout = '1s' ; SET transaction_timeout = '10ms' ; }
44
-
45
- session s6
46
- step s6_begin { BEGIN ISOLATION LEVEL READ COMMITTED ; }
47
- step s6_tt { SET statement_timeout = '1s' ; SET transaction_timeout = '10ms' ; }
48
-
49
- session checker
50
- step checker_sleep { SELECT pg_sleep (0.1 ); }
51
- step s3_check { SELECT count (* ) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s3' ; }
52
- step s4_check { SELECT count (* ) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s4' ; }
53
- step s5_check { SELECT count (* ) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s5' ; }
54
- step s6_check { SELECT count (* ) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s6' ; }
55
-
56
-
57
30
# It's possible that the isolation tester will not observe the final
58
31
# steps as "waiting", thanks to the relatively short timeouts we use.
59
32
# We can ensure consistent test output by marking those steps with (*).
@@ -74,14 +47,3 @@ permutation wrtbl lto update(*)
74
47
permutation wrtbl lsto update (* )
75
48
# statement timeout expires first, row-level lock
76
49
permutation wrtbl slto update (* )
77
-
78
- # statement timeout expires first
79
- permutation stto s3_begin s3_sleep s3_check s3_abort
80
- # transaction timeout expires first, session s3 FATAL-out
81
- permutation tsto s3_begin checker_sleep s3_check
82
- # idle in transaction timeout expires first, session s4 FATAL-out
83
- permutation itto s4_begin checker_sleep s4_check
84
- # transaction timeout expires first, session s5 FATAL-out
85
- permutation tito s5_begin checker_sleep s5_check
86
- # transaction timeout can be schedule amid transaction, session s6 FATAL-out
87
- permutation s6_begin s6_tt checker_sleep s6_check
0 commit comments