Исходный код СУБД 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
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 2 sessions
 
starting permutation: s1_wait_before_lock s2_changes s2_wakeup_before_lock s1_decode
injection_points_attach
-----------------------
                       
(1 row)
 
step s1_wait_before_lock: 
    REPACK (CONCURRENTLY) repack_toast;
 <waiting ...>
step s2_changes: 
    UPDATE repack_toast SET t = gen_external() WHERE i=1;
 
step s2_wakeup_before_lock: 
    SELECT injection_points_wakeup('repack-concurrently-before-lock');
 
injection_points_wakeup
-----------------------
                       
(1 row)
 
step s1_wait_before_lock: <... completed>
step s1_decode: 
    SELECT count(*) FROM pg_logical_slot_peek_changes('s', NULL, NULL, 'include-rewrites', '1',
                              'skip-empty-xacts', '1', 'include-xids', '0');
 
count
-----
    6
(1 row)
 
injection_points_detach
-----------------------
                       
(1 row)
 
pg_drop_replication_slot
------------------------
                        
(1 row)
 
 
starting permutation: s1_wait_before_lock s2_short_change s2_wakeup_before_lock s1_decode_updates
injection_points_attach
-----------------------
                       
(1 row)
 
step s1_wait_before_lock: 
    REPACK (CONCURRENTLY) repack_toast;
 <waiting ...>
step s2_short_change: 
    UPDATE repack_toast SET t = 'short' WHERE i=1;
 
step s2_wakeup_before_lock: 
    SELECT injection_points_wakeup('repack-concurrently-before-lock');
 
injection_points_wakeup
-----------------------
                       
(1 row)
 
step s1_wait_before_lock: <... completed>
step s1_decode_updates: 
    SELECT data FROM pg_logical_slot_peek_changes('s', NULL, NULL, 'include-rewrites', '1',
                             'skip-empty-xacts', '1', 'include-xids', '0')
    WHERE data LIKE '%UPDATE%';
 
data                                                           
---------------------------------------------------------------
table public.repack_toast: UPDATE: i[integer]:1 t[text]:'short'
(1 row)
 
injection_points_detach
-----------------------
                       
(1 row)
 
pg_drop_replication_slot
------------------------
                        
(1 row)