3 DROP TABLE IF EXISTS do_write
;
4 CREATE TABLE do_write
(id serial primary key
);
9 DROP TABLE IF EXISTS do_write
;
10 SELECT 'stop' FROM pg_drop_replication_slot
('isolation_slot'
);
14 setup
{ SET synchronous_commit
=on
; }
15 step "s0init"
{SELECT 'init' FROM pg_create_logical_replication_slot
('isolation_slot'
, 'test_decoding'
);}
16 step "s0start"
{SELECT data FROM pg_logical_slot_get_changes
('isolation_slot'
, NULL
, NULL
, 'include
-xids'
, 'false'
);}
17 step "s0alter"
{ALTER TABLE do_write ADD column ts timestamptz
; }
18 step "s0w"
{ INSERT INTO do_write DEFAULT VALUES
; }
21 setup
{ SET synchronous_commit
=on
; }
22 step "s1begin"
{BEGIN
;}
23 step "s1sharepgclass"
{ SELECT count
(*) > 1 FROM
(SELECT
* FROM pg_class FOR SHARE
) s
; }
24 step "s1keysharepgclass"
{ SELECT count
(*) > 1 FROM
(SELECT
* FROM pg_class FOR KEY SHARE
) s
; }
25 step "s1commit"
{COMMIT
;}
28 setup
{ SET synchronous_commit
=on
; }
29 step "s2begin"
{BEGIN
;}
30 step "s2sharepgclass"
{ SELECT count
(*) > 1 FROM
(SELECT
* FROM pg_class FOR SHARE
) s
; }
31 step "s2keysharepgclass"
{ SELECT count
(*) > 1 FROM
(SELECT
* FROM pg_class FOR KEY SHARE
) s
; }
32 step "s2commit"
{COMMIT
;}
34 # test that we're handling an update-only mxact xmax correctly
35 permutation "s0init" "s0start" "s1begin" "s1sharepgclass" "s2begin" "s2sharepgclass" "s0w" "s0start" "s2commit" "s1commit"
37 # test that we're handling an update-only mxact xmax correctly
38 permutation "s0init" "s0start" "s1begin" "s1keysharepgclass" "s2begin" "s2keysharepgclass" "s0alter" "s0w" "s0start" "s2commit" "s1commit"