Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
3 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Parsed test spec with 4 sessions
 
starting permutation: s1begin s1update s2lock s1abort s3nowait wake
step s1begin: BEGIN;
step s1update: UPDATE mxact_abort SET filler = 's1' WHERE id = 1;
step s2lock: SELECT * FROM mxact_abort WHERE id = 1 FOR KEY SHARE;
id|filler 
--+-------
 1|initial
(1 row)
 
step s1abort: ROLLBACK; <waiting ...>
step s3nowait: SELECT * FROM mxact_abort WHERE id = 1 FOR NO KEY UPDATE NOWAIT;
ERROR:  could not obtain lock on row in relation "mxact_abort"
step wake: 
    SELECT FROM injection_points_detach('transaction-abort-after-clog');
    SELECT FROM injection_points_wakeup('transaction-abort-after-clog');
 
step s1abort: <... completed>
 
starting permutation: s1begin s1update s2lock s1abort s3update wake
step s1begin: BEGIN;
step s1update: UPDATE mxact_abort SET filler = 's1' WHERE id = 1;
step s2lock: SELECT * FROM mxact_abort WHERE id = 1 FOR KEY SHARE;
id|filler 
--+-------
 1|initial
(1 row)
 
step s1abort: ROLLBACK; <waiting ...>
step s3update: UPDATE mxact_abort SET filler = 's3' WHERE id = 1; <waiting ...>
step wake: 
    SELECT FROM injection_points_detach('transaction-abort-after-clog');
    SELECT FROM injection_points_wakeup('transaction-abort-after-clog');
 
step s3update: <... completed>
step s1abort: <... completed>
 
starting permutation: s1begin s1update s2lock s1abort s3delete wake s3check
step s1begin: BEGIN;
step s1update: UPDATE mxact_abort SET filler = 's1' WHERE id = 1;
step s2lock: SELECT * FROM mxact_abort WHERE id = 1 FOR KEY SHARE;
id|filler 
--+-------
 1|initial
(1 row)
 
step s1abort: ROLLBACK; <waiting ...>
step s3delete: DELETE FROM mxact_abort WHERE id = 1; <waiting ...>
step wake: 
    SELECT FROM injection_points_detach('transaction-abort-after-clog');
    SELECT FROM injection_points_wakeup('transaction-abort-after-clog');
 
step s3delete: <... completed>
step s1abort: <... completed>
step s3check: SELECT * FROM mxact_abort ORDER BY id;
id|filler
--+------
(0 rows)
 
 
starting permutation: s1begin s1update s2lock s1abort s3keyupdate wake s3check
step s1begin: BEGIN;
step s1update: UPDATE mxact_abort SET filler = 's1' WHERE id = 1;
step s2lock: SELECT * FROM mxact_abort WHERE id = 1 FOR KEY SHARE;
id|filler 
--+-------
 1|initial
(1 row)
 
step s1abort: ROLLBACK; <waiting ...>
step s3keyupdate: UPDATE mxact_abort SET id = 2 WHERE id = 1; <waiting ...>
step wake: 
    SELECT FROM injection_points_detach('transaction-abort-after-clog');
    SELECT FROM injection_points_wakeup('transaction-abort-after-clog');
 
step s3keyupdate: <... completed>
step s1abort: <... completed>
step s3check: SELECT * FROM mxact_abort ORDER BY id;
id|filler 
--+-------
 2|initial
(1 row)