| 1 |
setup |
| 2 |
{ |
| 3 |
DROP TABLE IF EXISTS do_write; |
| 4 |
CREATE TABLE do_write(id serial primary key); |
| 5 |
} |
| 6 |
|
| 7 |
teardown |
| 8 |
{ |
| 9 |
DROP TABLE do_write; |
| 10 |
SELECT 'stop' FROM pg_drop_replication_slot('isolation_slot'); |
| 11 |
} |
| 12 |
|
| 13 |
session "s1" |
| 14 |
setup { SET synchronous_commit=on; } |
| 15 |
step "s1b" { BEGIN ISOLATION LEVEL SERIALIZABLE; } |
| 16 |
step "s1w" { INSERT INTO do_write DEFAULT VALUES; } |
| 17 |
step "s1c" { COMMIT; } |
| 18 |
session "s2" |
| 19 |
setup { SET synchronous_commit=on; } |
| 20 |
step "s2init" {SELECT 'init' FROM pg_create_logical_replication_slot('isolation_slot', 'test_decoding');} |
| 21 |
step "s2start" {SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', 'false');} |
| 22 |
|
| 23 |
|
| 24 |
permutation "s1b" "s1w" "s2init" "s1c" "s2start" "s1b" "s1w" "s1c" "s2start" "s1b" "s1w" "s2start" "s1c" "s2start" |