aboutsummaryrefslogtreecommitdiff
path: root/contrib/test_decoding/expected/slot.out
blob: 5e6b70ba38aa180a2c4fce4b42b6a4ab7f9d2c3c (plain)
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
SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot_p', 'test_decoding');
 ?column? 
----------
 init
(1 row)

SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot_t', 'test_decoding', true);
 ?column? 
----------
 init
(1 row)

SELECT pg_drop_replication_slot('regression_slot_p');
 pg_drop_replication_slot 
--------------------------
 
(1 row)

SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot_p', 'test_decoding', false);
 ?column? 
----------
 init
(1 row)

-- reconnect to clean temp slots
\c
SELECT pg_drop_replication_slot('regression_slot_p');
 pg_drop_replication_slot 
--------------------------
 
(1 row)

-- should fail because the temporary slot was dropped automatically
SELECT pg_drop_replication_slot('regression_slot_t');
ERROR:  replication slot "regression_slot_t" does not exist
-- test switching between slots in a session
SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot1', 'test_decoding', true);
 ?column? 
----------
 init
(1 row)

SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot2', 'test_decoding', true);
 ?column? 
----------
 init
(1 row)

SELECT * FROM pg_logical_slot_get_changes('regression_slot1', NULL, NULL);
 location | xid | data 
----------+-----+------
(0 rows)

SELECT * FROM pg_logical_slot_get_changes('regression_slot2', NULL, NULL);
 location | xid | data 
----------+-----+------
(0 rows)