Исходный код СУБД 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
Parsed test spec with 3 sessions
 
starting permutation: s1_upd_alter
step s1_upd_alter: 
    UPDATE rta_tgt
    SET s = x::text,
        n = (SELECT rta_exec('ALTER TYPE rta_type ALTER ATTRIBUTE b TYPE text'))
    FROM rta_func() x
    RETURNING s;
 
s                
-----------------
("\\x4649584d45")
(1 row)
 
 
starting permutation: s2_upd s1_upd_alter s2_commit
step s2_upd: BEGIN; UPDATE rta_tgt SET n = 0;
step s1_upd_alter: 
    UPDATE rta_tgt
    SET s = x::text,
        n = (SELECT rta_exec('ALTER TYPE rta_type ALTER ATTRIBUTE b TYPE text'))
    FROM rta_func() x
    RETURNING s;
 <waiting ...>
step s2_commit: COMMIT;
step s1_upd_alter: <... completed>
ERROR:  row type of datum tuple was altered after the datum's creation
 
starting permutation: s2_upd s1_upd_alter_col s2_commit
step s2_upd: BEGIN; UPDATE rta_tgt SET n = 0;
step s1_upd_alter_col: 
    UPDATE rta_tgt
    SET s = x.b::text,
        n = (SELECT rta_exec('ALTER TYPE rta_type ALTER ATTRIBUTE b TYPE text'))
    FROM rta_func() x
    RETURNING s;
 <waiting ...>
step s2_commit: COMMIT;
step s1_upd_alter_col: <... completed>
ERROR:  row type of datum tuple was altered after the datum's creation
 
starting permutation: s2_upd s3_lock s1_upd_lock s3_alter s2_commit
step s2_upd: BEGIN; UPDATE rta_tgt SET n = 0;
step s3_lock: BEGIN; LOCK rta_lockme;
step s1_upd_lock: 
    UPDATE rta_tgt
    SET s = x::text,
        n = (SELECT rta_exec('LOCK rta_lockme'))
    FROM rta_func() x
    RETURNING s;
 <waiting ...>
step s3_alter: ALTER TYPE rta_type ALTER ATTRIBUTE b TYPE text; COMMIT;
step s2_commit: COMMIT;
step s1_upd_lock: <... completed>
ERROR:  row type of datum tuple was altered after the datum's creation