blob: f3941f786314d5c1f3d9a085d13624bfae498a42 (
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
|
# Exercise the case where a read-only serializable transaction has
# SXACT_FLAG_RO_SAFE set in a parallel query.
setup
{
CREATE TABLE foo AS SELECT generate_series(1, 10)::int a;
ALTER TABLE foo SET (parallel_workers = 2);
}
teardown
{
DROP TABLE foo;
}
session s1
setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; }
step s1r { SELECT * FROM foo; }
step s1c { COMMIT; }
session s2
setup {
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY;
SET parallel_setup_cost = 0;
SET parallel_tuple_cost = 0;
}
step s2r1 { SELECT * FROM foo; }
step s2r2 { SELECT * FROM foo; }
step s2c { COMMIT; }
permutation s1r s2r1 s1c s2r2 s2c
|