Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
2 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
Parsed test spec with 3 sessions
 
starting permutation: s1_size s2_repack s3_updates s3_insert s1_unlock s2_noop s1_size
injection_points_attach
-----------------------
                       
(1 row)
 
step s1_size: 
    SELECT id, pg_column_size(repack_dropped) < current_setting('block_size')::int
        AS fits_in_one_block
        FROM repack_dropped ORDER BY id;
 
id|fits_in_one_block
--+-----------------
 1|f                
 2|f                
(2 rows)
 
step s2_repack: 
    REPACK (CONCURRENTLY) repack_dropped;
 <waiting ...>
step s3_updates: 
    UPDATE repack_dropped SET a = a || a;
 
step s3_insert: 
    INSERT INTO repack_dropped (id, a) VALUES (3, 'three');
 
step s1_unlock: 
    SELECT injection_points_wakeup('repack-concurrently-before-lock');
 
injection_points_wakeup
-----------------------
                       
(1 row)
 
step s2_repack: <... completed>
step s2_noop: 
 
step s1_size: 
    SELECT id, pg_column_size(repack_dropped) < current_setting('block_size')::int
        AS fits_in_one_block
        FROM repack_dropped ORDER BY id;
 
id|fits_in_one_block
--+-----------------
 1|t                
 2|t                
 3|t                
(3 rows)
 
injection_points_detach
-----------------------
                       
(1 row)