| 1 |
Parsed test spec with 2 sessions |
| 2 |
|
| 3 |
starting permutation: r1 r2 w1 w2 c1 c2 |
| 4 |
step r1: SELECT COALESCE(MAX(invoice_number) + 1, 1) FROM invoice WHERE year = 2016; |
| 5 |
coalesce |
| 6 |
-------- |
| 7 |
3 |
| 8 |
(1 row) |
| 9 |
|
| 10 |
step r2: SELECT COALESCE(MAX(invoice_number) + 1, 1) FROM invoice WHERE year = 2016; |
| 11 |
coalesce |
| 12 |
-------- |
| 13 |
3 |
| 14 |
(1 row) |
| 15 |
|
| 16 |
step w1: INSERT INTO invoice VALUES (2016, 3); |
| 17 |
step w2: INSERT INTO invoice VALUES (2016, 3); <waiting ...> |
| 18 |
step c1: COMMIT; |
| 19 |
step w2: <... completed> |
| 20 |
ERROR: could not serialize access due to read/write dependencies among transactions |
| 21 |
step c2: COMMIT; |
| 22 |
|
| 23 |
starting permutation: r1 w1 w2 c1 c2 |
| 24 |
step r1: SELECT COALESCE(MAX(invoice_number) + 1, 1) FROM invoice WHERE year = 2016; |
| 25 |
coalesce |
| 26 |
-------- |
| 27 |
3 |
| 28 |
(1 row) |
| 29 |
|
| 30 |
step w1: INSERT INTO invoice VALUES (2016, 3); |
| 31 |
step w2: INSERT INTO invoice VALUES (2016, 3); <waiting ...> |
| 32 |
step c1: COMMIT; |
| 33 |
step w2: <... completed> |
| 34 |
ERROR: duplicate key value violates unique constraint "invoice_pkey" |
| 35 |
step c2: COMMIT; |
| 36 |
|
| 37 |
starting permutation: r2 w1 w2 c1 c2 |
| 38 |
step r2: SELECT COALESCE(MAX(invoice_number) + 1, 1) FROM invoice WHERE year = 2016; |
| 39 |
coalesce |
| 40 |
-------- |
| 41 |
3 |
| 42 |
(1 row) |
| 43 |
|
| 44 |
step w1: INSERT INTO invoice VALUES (2016, 3); |
| 45 |
step w2: INSERT INTO invoice VALUES (2016, 3); <waiting ...> |
| 46 |
step c1: COMMIT; |
| 47 |
step w2: <... completed> |
| 48 |
ERROR: duplicate key value violates unique constraint "invoice_pkey" |
| 49 |
step c2: COMMIT; |