Improve display of query results in isolation tests.

Previously, isolationtester displayed SQL query results using some
ad-hoc code that clearly hadn't had much effort expended on it.
Field values longer than 14 characters weren't separated from
the next field, and usually caused misalignment of the columns
too.  Also there was no visual separation of a query's result
from subsequent isolationtester output.  This made test result
files confusing and hard to read.

To improve matters, let's use libpq's PQprint() function.  Although
that's long since unused by psql, it's still plenty good enough
for the purpose here.

Like 741d7f104, back-patch to all supported branches, so that this
isn't a stumbling block for back-patching isolation test changes.

Discussion: https://postgr.es/m/582362.1623798221@sss.pgh.pa.us
This commit is contained in:
Tom Lane 2021-06-23 11:12:31 -04:00
parent 24043c27b4
commit 4a054069a3
104 changed files with 33226 additions and 13736 deletions

File diff suppressed because it is too large Load Diff

View File

@ -9,12 +9,16 @@ step s1_toast_insert: INSERT INTO stream_test SELECT large_val();
step s2_ddl: CREATE TABLE stream_test2(data text);
step s1_commit: COMMIT;
step s1_get_stream_changes: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL,NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'stream-changes', '1');
data
data
----------------------------------------
opening a streamed block for transaction
streaming change for transaction
streaming change for transaction
closing a streamed block for transaction
committing streamed transaction
?column?
committing streamed transaction
(4 rows)
?column?
--------
stop
(1 row)
stop

View File

@ -6,33 +6,45 @@ step s1w: INSERT INTO do_write DEFAULT VALUES;
step s2init: SELECT 'init' FROM pg_create_logical_replication_slot('isolation_slot', 'test_decoding'); <waiting ...>
step s1c: COMMIT;
step s2init: <... completed>
?column?
?column?
--------
init
(1 row)
init
step s2start: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', 'false');
data
data
----
(0 rows)
step s1b: BEGIN ISOLATION LEVEL SERIALIZABLE;
step s1w: INSERT INTO do_write DEFAULT VALUES;
step s1c: COMMIT;
step s2start: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', 'false');
data
BEGIN
data
--------------------------------------------
BEGIN
table public.do_write: INSERT: id[integer]:2
COMMIT
COMMIT
(3 rows)
step s1b: BEGIN ISOLATION LEVEL SERIALIZABLE;
step s1w: INSERT INTO do_write DEFAULT VALUES;
step s2start: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', 'false');
data
data
----
(0 rows)
step s1c: COMMIT;
step s2start: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', 'false');
data
BEGIN
data
--------------------------------------------
BEGIN
table public.do_write: INSERT: id[integer]:3
COMMIT
?column?
COMMIT
(3 rows)
?column?
--------
stop
(1 row)
stop

View File

@ -2,65 +2,89 @@ Parsed test spec with 3 sessions
starting permutation: s0init s0start s1begin s1sharepgclass s2begin s2sharepgclass s0w s0start s2commit s1commit
step s0init: SELECT 'init' FROM pg_create_logical_replication_slot('isolation_slot', 'test_decoding');
?column?
?column?
--------
init
(1 row)
init
step s0start: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', 'false');
data
data
----
(0 rows)
step s1begin: BEGIN;
step s1sharepgclass: SELECT count(*) > 1 FROM (SELECT * FROM pg_class FOR SHARE) s;
?column?
?column?
--------
t
(1 row)
t
step s2begin: BEGIN;
step s2sharepgclass: SELECT count(*) > 1 FROM (SELECT * FROM pg_class FOR SHARE) s;
?column?
?column?
--------
t
(1 row)
t
step s0w: INSERT INTO do_write DEFAULT VALUES;
step s0start: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', 'false');
data
BEGIN
data
--------------------------------------------
BEGIN
table public.do_write: INSERT: id[integer]:1
COMMIT
COMMIT
(3 rows)
step s2commit: COMMIT;
step s1commit: COMMIT;
?column?
?column?
--------
stop
(1 row)
stop
starting permutation: s0init s0start s1begin s1keysharepgclass s2begin s2keysharepgclass s0alter s0w s0start s2commit s1commit
step s0init: SELECT 'init' FROM pg_create_logical_replication_slot('isolation_slot', 'test_decoding');
?column?
?column?
--------
init
(1 row)
init
step s0start: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', 'false');
data
data
----
(0 rows)
step s1begin: BEGIN;
step s1keysharepgclass: SELECT count(*) > 1 FROM (SELECT * FROM pg_class FOR KEY SHARE) s;
?column?
?column?
--------
t
(1 row)
t
step s2begin: BEGIN;
step s2keysharepgclass: SELECT count(*) > 1 FROM (SELECT * FROM pg_class FOR KEY SHARE) s;
?column?
?column?
--------
t
(1 row)
t
step s0alter: ALTER TABLE do_write ADD column ts timestamptz;
step s0w: INSERT INTO do_write DEFAULT VALUES;
step s0start: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', 'false');
data
BEGIN
COMMIT
BEGIN
data
------------------------------------------------------------------------------
BEGIN
COMMIT
BEGIN
table public.do_write: INSERT: id[integer]:1 ts[timestamp with time zone]:null
COMMIT
COMMIT
(5 rows)
step s2commit: COMMIT;
step s1commit: COMMIT;
?column?
?column?
--------
stop
(1 row)
stop

View File

@ -3,28 +3,38 @@ Parsed test spec with 2 sessions
starting permutation: s0_begin s0_getxid s1_begin s1_insert s0_alter s0_commit s0_checkpoint s0_get_changes s0_get_changes s1_commit s0_vacuum s0_get_changes
step s0_begin: BEGIN;
step s0_getxid: SELECT pg_current_xact_id() IS NULL;
?column?
?column?
--------
f
(1 row)
f
step s1_begin: BEGIN;
step s1_insert: INSERT INTO harvest VALUES ((1, 2, 3));
step s0_alter: ALTER TYPE basket DROP ATTRIBUTE mangos;
step s0_commit: COMMIT;
step s0_checkpoint: CHECKPOINT;
step s0_get_changes: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
data
data
----
(0 rows)
step s0_get_changes: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
data
data
----
(0 rows)
step s1_commit: COMMIT;
step s0_vacuum: VACUUM pg_attribute;
step s0_get_changes: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
data
BEGIN
data
------------------------------------------------------
BEGIN
table public.harvest: INSERT: fruits[basket]:'(1,2,3)'
COMMIT
?column?
COMMIT
(3 rows)
?column?
--------
stop
(1 row)
stop

View File

@ -3,50 +3,64 @@ Parsed test spec with 3 sessions
starting permutation: s2b s2txid s1init s3b s3txid s2alter s2c s2b s2txid s3c s2c s1insert s1checkpoint s1start s1insert s1alter s1insert s1start
step s2b: BEGIN;
step s2txid: SELECT pg_current_xact_id() IS NULL;
?column?
?column?
--------
f
(1 row)
f
step s1init: SELECT 'init' FROM pg_create_logical_replication_slot('isolation_slot', 'test_decoding'); <waiting ...>
step s3b: BEGIN;
step s3txid: SELECT pg_current_xact_id() IS NULL;
?column?
?column?
--------
f
(1 row)
f
step s2alter: ALTER TABLE do_write ADD COLUMN addedbys2 int;
step s2c: COMMIT;
step s2b: BEGIN;
step s2txid: SELECT pg_current_xact_id() IS NULL;
?column?
?column?
--------
f
(1 row)
f
step s3c: COMMIT;
step s1init: <... completed>
?column?
?column?
--------
init
(1 row)
init
step s2c: COMMIT;
step s1insert: INSERT INTO do_write DEFAULT VALUES;
step s1checkpoint: CHECKPOINT;
step s1start: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', 'false');
data
BEGIN
data
--------------------------------------------------------------------
BEGIN
table public.do_write: INSERT: id[integer]:1 addedbys2[integer]:null
COMMIT
COMMIT
(3 rows)
step s1insert: INSERT INTO do_write DEFAULT VALUES;
step s1alter: ALTER TABLE do_write ADD COLUMN addedbys1 int;
step s1insert: INSERT INTO do_write DEFAULT VALUES;
step s1start: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', 'false');
data
BEGIN
table public.do_write: INSERT: id[integer]:2 addedbys2[integer]:null
COMMIT
BEGIN
COMMIT
BEGIN
data
--------------------------------------------------------------------------------------------
BEGIN
table public.do_write: INSERT: id[integer]:2 addedbys2[integer]:null
COMMIT
BEGIN
COMMIT
BEGIN
table public.do_write: INSERT: id[integer]:3 addedbys2[integer]:null addedbys1[integer]:null
COMMIT
?column?
COMMIT
(8 rows)
?column?
--------
stop
(1 row)
stop

View File

@ -4,32 +4,40 @@ starting permutation: s0_begin s0_begin_sub0 s0_log_assignment s0_sub_get_base_s
step s0_begin: BEGIN;
step s0_begin_sub0: SAVEPOINT s0;
step s0_log_assignment: SELECT pg_current_xact_id() IS NULL;
?column?
?column?
--------
f
(1 row)
f
step s0_sub_get_base_snap: INSERT INTO dummy VALUES (0);
step s1_produce_new_snap: ALTER TABLE harvest ADD COLUMN mangos int;
step s0_insert: INSERT INTO harvest VALUES (1, 2, 3);
step s0_end_sub0: RELEASE SAVEPOINT s0;
step s0_commit: COMMIT;
step s0_get_changes: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
data
BEGIN
table public.dummy: INSERT: i[integer]:0
data
----------------------------------------------------------------------------------
BEGIN
table public.dummy: INSERT: i[integer]:0
table public.harvest: INSERT: apples[integer]:1 pears[integer]:2 mangos[integer]:3
COMMIT
?column?
COMMIT
(4 rows)
?column?
--------
stop
(1 row)
stop
starting permutation: s0_begin s0_begin_sub0 s0_log_assignment s0_begin_sub1 s0_sub_get_base_snap s1_produce_new_snap s0_insert s0_end_sub1 s0_end_sub0 s0_commit s0_get_changes
step s0_begin: BEGIN;
step s0_begin_sub0: SAVEPOINT s0;
step s0_log_assignment: SELECT pg_current_xact_id() IS NULL;
?column?
?column?
--------
f
(1 row)
f
step s0_begin_sub1: SAVEPOINT s1;
step s0_sub_get_base_snap: INSERT INTO dummy VALUES (0);
step s1_produce_new_snap: ALTER TABLE harvest ADD COLUMN mangos int;
@ -38,12 +46,16 @@ step s0_end_sub1: RELEASE SAVEPOINT s1;
step s0_end_sub0: RELEASE SAVEPOINT s0;
step s0_commit: COMMIT;
step s0_get_changes: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
data
BEGIN
table public.dummy: INSERT: i[integer]:0
data
----------------------------------------------------------------------------------
BEGIN
table public.dummy: INSERT: i[integer]:0
table public.harvest: INSERT: apples[integer]:1 pears[integer]:2 mangos[integer]:3
COMMIT
?column?
COMMIT
(4 rows)
?column?
--------
stop
(1 row)
stop

View File

@ -15,25 +15,35 @@ step s2_checkpoint: CHECKPOINT;
step s1_begin: BEGIN;
step s1_dml: INSERT INTO harvest VALUES (43);
step s0_many_subxacts: select subxacts();
subxacts
subxacts
--------
(1 row)
step s0_commit: COMMIT;
step s2_checkpoint: CHECKPOINT;
step s2_get_changes_suppress_output: SELECT null n FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1') GROUP BY n;
n
n
-
(1 row)
step s2_get_changes_suppress_output: SELECT null n FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1') GROUP BY n;
n
n
-
(0 rows)
step s1_commit: COMMIT;
step s2_get_changes: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
data
BEGIN
data
------------------------------------------------
BEGIN
table public.harvest: INSERT: apples[integer]:43
COMMIT
?column?
COMMIT
(3 rows)
?column?
--------
stop
(1 row)
stop

View File

@ -3,39 +3,51 @@ Parsed test spec with 3 sessions
starting permutation: s2b s2txid s1init s3b s3txid s2c s2b s2insert s2p s3c s1insert s1start s2cp s1start
step s2b: BEGIN;
step s2txid: SELECT pg_current_xact_id() IS NULL;
?column?
?column?
--------
f
(1 row)
f
step s1init: SELECT 'init' FROM pg_create_logical_replication_slot('isolation_slot', 'test_decoding', false, true); <waiting ...>
step s3b: BEGIN;
step s3txid: SELECT pg_current_xact_id() IS NULL;
?column?
?column?
--------
f
(1 row)
f
step s2c: COMMIT;
step s2b: BEGIN;
step s2insert: INSERT INTO do_write DEFAULT VALUES;
step s2p: PREPARE TRANSACTION 'test1';
step s3c: COMMIT;
step s1init: <... completed>
?column?
?column?
--------
init
(1 row)
init
step s1insert: INSERT INTO do_write DEFAULT VALUES;
step s1start: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', 'false', 'skip-empty-xacts', '1');
data
BEGIN
data
--------------------------------------------
BEGIN
table public.do_write: INSERT: id[integer]:2
COMMIT
COMMIT
(3 rows)
step s2cp: COMMIT PREPARED 'test1';
step s1start: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', 'false', 'skip-empty-xacts', '1');
data
BEGIN
data
--------------------------------------------
BEGIN
table public.do_write: INSERT: id[integer]:1
PREPARE TRANSACTION 'test1'
COMMIT PREPARED 'test1'
?column?
PREPARE TRANSACTION 'test1'
COMMIT PREPARED 'test1'
(4 rows)
?column?
--------
stop
(1 row)
stop

View File

@ -5,14 +5,18 @@ step s1s: SAVEPOINT f;
step s1u: UPDATE foo SET key = 2;
step s1r: ROLLBACK TO f;
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1c: COMMIT;
step s2l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
starting permutation: s1s s1u s1r s1l s2l s1c s2c
@ -20,13 +24,17 @@ step s1s: SAVEPOINT f;
step s1u: UPDATE foo SET key = 2;
step s1r: ROLLBACK TO f;
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1c: COMMIT;
step s2c: COMMIT;
@ -35,13 +43,17 @@ step s1s: SAVEPOINT f;
step s1u: UPDATE foo SET key = 2;
step s1r: ROLLBACK TO f;
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
step s1c: COMMIT;
@ -50,13 +62,17 @@ step s1s: SAVEPOINT f;
step s1u: UPDATE foo SET key = 2;
step s1r: ROLLBACK TO f;
step s2l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1c: COMMIT;
step s2c: COMMIT;
@ -65,13 +81,17 @@ step s1s: SAVEPOINT f;
step s1u: UPDATE foo SET key = 2;
step s1r: ROLLBACK TO f;
step s2l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
step s1c: COMMIT;
@ -80,14 +100,18 @@ step s1s: SAVEPOINT f;
step s1u: UPDATE foo SET key = 2;
step s1r: ROLLBACK TO f;
step s2l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1c: COMMIT;
starting permutation: s1s s1u s2l s1r s1l s1c s2c
@ -96,13 +120,17 @@ step s1u: UPDATE foo SET key = 2;
step s2l: SELECT * FROM foo FOR KEY SHARE; <waiting ...>
step s1r: ROLLBACK TO f;
step s2l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1c: COMMIT;
step s2c: COMMIT;
@ -112,13 +140,17 @@ step s1u: UPDATE foo SET key = 2;
step s2l: SELECT * FROM foo FOR KEY SHARE; <waiting ...>
step s1r: ROLLBACK TO f;
step s2l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
step s1c: COMMIT;
@ -128,89 +160,113 @@ step s1u: UPDATE foo SET key = 2;
step s2l: SELECT * FROM foo FOR KEY SHARE; <waiting ...>
step s1r: ROLLBACK TO f;
step s2l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1c: COMMIT;
starting permutation: s1s s2l s1u s2c s1r s1l s1c
step s1s: SAVEPOINT f;
step s2l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1u: UPDATE foo SET key = 2; <waiting ...>
step s2c: COMMIT;
step s1u: <... completed>
step s1r: ROLLBACK TO f;
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1c: COMMIT;
starting permutation: s1s s2l s2c s1u s1r s1l s1c
step s1s: SAVEPOINT f;
step s2l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
step s1u: UPDATE foo SET key = 2;
step s1r: ROLLBACK TO f;
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1c: COMMIT;
starting permutation: s2l s1s s1u s2c s1r s1l s1c
step s2l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1s: SAVEPOINT f;
step s1u: UPDATE foo SET key = 2; <waiting ...>
step s2c: COMMIT;
step s1u: <... completed>
step s1r: ROLLBACK TO f;
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1c: COMMIT;
starting permutation: s2l s1s s2c s1u s1r s1l s1c
step s2l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1s: SAVEPOINT f;
step s2c: COMMIT;
step s1u: UPDATE foo SET key = 2;
step s1r: ROLLBACK TO f;
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1c: COMMIT;
starting permutation: s2l s2c s1s s1u s1r s1l s1c
step s2l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
step s1s: SAVEPOINT f;
step s1u: UPDATE foo SET key = 2;
step s1r: ROLLBACK TO f;
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1c: COMMIT;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -7,9 +7,11 @@ step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
@ -21,9 +23,11 @@ step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2a: BEGIN;
step s1d: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
@ -34,9 +38,11 @@ step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
@ -48,9 +54,11 @@ step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
step s2c: <... completed>
@ -64,9 +72,11 @@ step s2a: BEGIN;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
@ -77,9 +87,11 @@ step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2a: BEGIN;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
@ -91,9 +103,11 @@ step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2a: BEGIN;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
step s2c: <... completed>
@ -105,9 +119,11 @@ step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
@ -119,9 +135,11 @@ step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
@ -134,9 +152,11 @@ step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
@ -151,9 +171,11 @@ step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
@ -164,9 +186,11 @@ step s2a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
@ -178,9 +202,11 @@ step s2a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
step s2c: <... completed>
@ -192,9 +218,11 @@ step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
@ -206,9 +234,11 @@ step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
@ -221,9 +251,11 @@ step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
@ -235,9 +267,11 @@ starting permutation: s1a s2a s2b s1b s1c s1d s2c s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
@ -249,9 +283,11 @@ starting permutation: s1a s2a s2b s1b s1c s2c s1d s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
@ -264,9 +300,11 @@ starting permutation: s1a s2a s2b s1b s2c s1c s1d s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
@ -279,9 +317,11 @@ starting permutation: s1a s2a s2b s2c s1b s1c s1d s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1b: ALTER TABLE a DISABLE TRIGGER t;
@ -293,9 +333,11 @@ starting permutation: s1a s2a s2b s2c s1b s1c s2d s1d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1b: ALTER TABLE a DISABLE TRIGGER t;
@ -307,9 +349,11 @@ starting permutation: s1a s2a s2b s2c s1b s2d s1c s1d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1b: ALTER TABLE a DISABLE TRIGGER t;
@ -321,9 +365,11 @@ starting permutation: s1a s2a s2b s2c s2d s1b s1c s1d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
@ -338,9 +384,11 @@ step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
@ -351,9 +399,11 @@ step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
@ -365,9 +415,11 @@ step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
step s2c: <... completed>
@ -379,9 +431,11 @@ step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
@ -393,9 +447,11 @@ step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
@ -408,9 +464,11 @@ step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
@ -422,9 +480,11 @@ starting permutation: s2a s1a s2b s1b s1c s1d s2c s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
@ -436,9 +496,11 @@ starting permutation: s2a s1a s2b s1b s1c s2c s1d s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
@ -451,9 +513,11 @@ starting permutation: s2a s1a s2b s1b s2c s1c s1d s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
@ -466,9 +530,11 @@ starting permutation: s2a s1a s2b s2c s1b s1c s1d s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1b: ALTER TABLE a DISABLE TRIGGER t;
@ -480,9 +546,11 @@ starting permutation: s2a s1a s2b s2c s1b s1c s2d s1d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1b: ALTER TABLE a DISABLE TRIGGER t;
@ -494,9 +562,11 @@ starting permutation: s2a s1a s2b s2c s1b s2d s1c s1d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1b: ALTER TABLE a DISABLE TRIGGER t;
@ -508,9 +578,11 @@ starting permutation: s2a s1a s2b s2c s2d s1b s1c s1d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
@ -521,9 +593,11 @@ step s1d: COMMIT;
starting permutation: s2a s2b s1a s1b s1c s1d s2c s2d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
@ -535,9 +609,11 @@ step s2d: COMMIT;
starting permutation: s2a s2b s1a s1b s1c s2c s1d s2d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
@ -550,9 +626,11 @@ step s2d: COMMIT;
starting permutation: s2a s2b s1a s1b s2c s1c s1d s2d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
@ -565,9 +643,11 @@ step s2d: COMMIT;
starting permutation: s2a s2b s1a s2c s1b s1c s1d s2d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1a: BEGIN;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
@ -579,9 +659,11 @@ step s2d: COMMIT;
starting permutation: s2a s2b s1a s2c s1b s1c s2d s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1a: BEGIN;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
@ -593,9 +675,11 @@ step s1d: COMMIT;
starting permutation: s2a s2b s1a s2c s1b s2d s1c s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1a: BEGIN;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
@ -607,9 +691,11 @@ step s1d: COMMIT;
starting permutation: s2a s2b s1a s2c s2d s1b s1c s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1a: BEGIN;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
@ -621,9 +707,11 @@ step s1d: COMMIT;
starting permutation: s2a s2b s2c s1a s1b s1c s1d s2d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1a: BEGIN;
@ -635,9 +723,11 @@ step s2d: COMMIT;
starting permutation: s2a s2b s2c s1a s1b s1c s2d s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1a: BEGIN;
@ -649,9 +739,11 @@ step s1d: COMMIT;
starting permutation: s2a s2b s2c s1a s1b s2d s1c s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1a: BEGIN;
@ -663,9 +755,11 @@ step s1d: COMMIT;
starting permutation: s2a s2b s2c s1a s2d s1b s1c s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1a: BEGIN;
@ -677,9 +771,11 @@ step s1d: COMMIT;
starting permutation: s2a s2b s2c s2d s1a s1b s1c s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;

View File

@ -6,13 +6,17 @@ step s1delc1: ALTER TABLE c1 NO INHERIT p;
step s2sel: SELECT SUM(a) FROM p; <waiting ...>
step s1c: COMMIT;
step s2sel: <... completed>
sum
sum
---
11
(1 row)
11
step s2sel: SELECT SUM(a) FROM p;
sum
sum
---
1
(1 row)
1
starting permutation: s1b s1delc1 s1addc2 s2sel s1c s2sel
step s1b: BEGIN;
@ -21,13 +25,17 @@ step s1addc2: ALTER TABLE c2 INHERIT p;
step s2sel: SELECT SUM(a) FROM p; <waiting ...>
step s1c: COMMIT;
step s2sel: <... completed>
sum
sum
---
11
(1 row)
11
step s2sel: SELECT SUM(a) FROM p;
sum
sum
---
101
(1 row)
101
starting permutation: s1b s1dropc1 s2sel s1c s2sel
step s1b: BEGIN;
@ -35,13 +43,17 @@ step s1dropc1: DROP TABLE c1;
step s2sel: SELECT SUM(a) FROM p; <waiting ...>
step s1c: COMMIT;
step s2sel: <... completed>
sum
sum
---
1
(1 row)
1
step s2sel: SELECT SUM(a) FROM p;
sum
sum
---
1
(1 row)
1
starting permutation: s1b s1delc1 s1modc1a s2sel s1c s2sel
step s1b: BEGIN;
@ -52,6 +64,8 @@ step s1c: COMMIT;
step s2sel: <... completed>
ERROR: attribute "a" of relation "c1" does not match parent's type
step s2sel: SELECT SUM(a) FROM p;
sum
sum
---
1
(1 row)
1

View File

@ -8,9 +8,11 @@ step notify2: NOTIFY c2, 'payload';
notifier: NOTIFY "c2" with payload "payload" from notifier
step notify3: NOTIFY c3, 'payload3';
step notifyf: SELECT pg_notify('c2', NULL);
pg_notify
pg_notify
---------
(1 row)
notifier: NOTIFY "c2" with payload "" from notifier
starting permutation: listenc notifyd1 notifyd2 notifys1
@ -51,13 +53,17 @@ step notify1: NOTIFY c1;
step notify2: NOTIFY c2, 'payload';
step notify3: NOTIFY c3, 'payload3';
step notifyf: SELECT pg_notify('c2', NULL);
pg_notify
pg_notify
---------
(1 row)
step lcheck: SELECT 1 AS x;
x
x
-
1
(1 row)
1
listener: NOTIFY "c1" with payload "" from notifier
listener: NOTIFY "c2" with payload "payload" from notifier
listener: NOTIFY "c2" with payload "" from notifier
@ -71,14 +77,18 @@ step notify2: NOTIFY c2, 'payload';
notifier: NOTIFY "c2" with payload "payload" from notifier
step notify3: NOTIFY c3, 'payload3';
step notifyf: SELECT pg_notify('c2', NULL);
pg_notify
pg_notify
---------
(1 row)
notifier: NOTIFY "c2" with payload "" from notifier
step lcheck: SELECT 1 AS x;
x
x
-
1
(1 row)
1
listener: NOTIFY "c1" with payload "" from notifier
listener: NOTIFY "c2" with payload "payload" from notifier
listener: NOTIFY "c2" with payload "" from notifier
@ -98,14 +108,20 @@ starting permutation: llisten lbegin usage bignotify usage
step llisten: LISTEN c1; LISTEN c2;
step lbegin: BEGIN;
step usage: SELECT pg_notification_queue_usage() > 0 AS nonzero;
nonzero
nonzero
-------
f
(1 row)
f
step bignotify: SELECT count(pg_notify('c1', s::text)) FROM generate_series(1, 1000) s;
count
count
-----
1000
(1 row)
1000
step usage: SELECT pg_notification_queue_usage() > 0 AS nonzero;
nonzero
nonzero
-------
t
(1 row)
t

View File

@ -2,28 +2,36 @@ Parsed test spec with 2 sessions
starting permutation: rx1 wy1 c1 ry2 wx2 c2
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step c1: COMMIT;
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
1
(1 row)
1
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step c2: COMMIT;
starting permutation: rx1 wy1 ry2 c1 wx2 c2
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step c1: COMMIT;
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
ERROR: could not serialize access due to read/write dependencies among transactions
@ -31,14 +39,18 @@ step c2: COMMIT;
starting permutation: rx1 wy1 ry2 wx2 c1 c2
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step c1: COMMIT;
step c2: COMMIT;
@ -46,14 +58,18 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 wy1 ry2 wx2 c2 c1
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step c2: COMMIT;
step c1: COMMIT;
@ -61,13 +77,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 ry2 wy1 c1 wx2 c2
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step c1: COMMIT;
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
@ -76,13 +96,17 @@ step c2: COMMIT;
starting permutation: rx1 ry2 wy1 wx2 c1 c2
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step c1: COMMIT;
@ -91,13 +115,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 ry2 wy1 wx2 c2 c1
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step c2: COMMIT;
@ -106,13 +134,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 ry2 wx2 wy1 c1 c2
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step c1: COMMIT;
@ -121,13 +153,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 ry2 wx2 wy1 c2 c1
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step c2: COMMIT;
@ -136,13 +172,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 ry2 wx2 c2 wy1 c1
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step c2: COMMIT;
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
@ -151,13 +191,17 @@ step c1: COMMIT;
starting permutation: ry2 rx1 wy1 c1 wx2 c2
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step c1: COMMIT;
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
@ -166,13 +210,17 @@ step c2: COMMIT;
starting permutation: ry2 rx1 wy1 wx2 c1 c2
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step c1: COMMIT;
@ -181,13 +229,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 rx1 wy1 wx2 c2 c1
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step c2: COMMIT;
@ -196,13 +248,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 rx1 wx2 wy1 c1 c2
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step c1: COMMIT;
@ -211,13 +267,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 rx1 wx2 wy1 c2 c1
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step c2: COMMIT;
@ -226,13 +286,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 rx1 wx2 c2 wy1 c1
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step c2: COMMIT;
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
@ -241,14 +305,18 @@ step c1: COMMIT;
starting permutation: ry2 wx2 rx1 wy1 c1 c2
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step c1: COMMIT;
step c2: COMMIT;
@ -256,14 +324,18 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 wx2 rx1 wy1 c2 c1
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step c2: COMMIT;
step c1: COMMIT;
@ -271,14 +343,18 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 wx2 rx1 c2 wy1 c1
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
0
(1 row)
0
step c2: COMMIT;
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
ERROR: could not serialize access due to read/write dependencies among transactions
@ -286,14 +362,18 @@ step c1: COMMIT;
starting permutation: ry2 wx2 c2 rx1 wy1 c1
step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
count
count
-----
0
(1 row)
0
step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
step c2: COMMIT;
step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
step c1: COMMIT;

View File

@ -6,9 +6,11 @@ step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
@ -18,9 +20,11 @@ step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2a: BEGIN;
step s1c: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
@ -29,9 +33,11 @@ step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1c: COMMIT;
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
@ -41,9 +47,11 @@ step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
step s1c: COMMIT;
step s2c: <... completed>
@ -55,9 +63,11 @@ step s2a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
@ -66,9 +76,11 @@ step s1a: BEGIN;
step s2a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1c: COMMIT;
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
@ -78,9 +90,11 @@ step s1a: BEGIN;
step s2a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
step s1c: COMMIT;
step s2c: <... completed>
@ -90,9 +104,11 @@ starting permutation: s1a s2a s2b s1b s1c s2c s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
step s2c: UPDATE a SET i = 4 WHERE i = 3;
@ -102,9 +118,11 @@ starting permutation: s1a s2a s2b s1b s2c s1c s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
step s1c: COMMIT;
@ -115,9 +133,11 @@ starting permutation: s1a s2a s2b s2c s1b s2d s1c
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); <waiting ...>
step s2d: COMMIT;
@ -128,9 +148,11 @@ starting permutation: s1a s2a s2b s2c s2d s1b s1c
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
@ -142,9 +164,11 @@ step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
@ -153,9 +177,11 @@ step s2a: BEGIN;
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1c: COMMIT;
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
@ -165,9 +191,11 @@ step s2a: BEGIN;
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
step s1c: COMMIT;
step s2c: <... completed>
@ -177,9 +205,11 @@ starting permutation: s2a s1a s2b s1b s1c s2c s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
step s2c: UPDATE a SET i = 4 WHERE i = 3;
@ -189,9 +219,11 @@ starting permutation: s2a s1a s2b s1b s2c s1c s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
step s1c: COMMIT;
@ -202,9 +234,11 @@ starting permutation: s2a s1a s2b s2c s1b s2d s1c
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); <waiting ...>
step s2d: COMMIT;
@ -215,9 +249,11 @@ starting permutation: s2a s1a s2b s2c s2d s1b s1c
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
@ -226,9 +262,11 @@ step s1c: COMMIT;
starting permutation: s2a s2b s1a s1b s1c s2c s2d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
@ -238,9 +276,11 @@ step s2d: COMMIT;
starting permutation: s2a s2b s1a s1b s2c s1c s2d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
@ -251,9 +291,11 @@ step s2d: COMMIT;
starting permutation: s2a s2b s1a s2c s1b s2d s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1a: BEGIN;
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); <waiting ...>
@ -264,9 +306,11 @@ step s1c: COMMIT;
starting permutation: s2a s2b s1a s2c s2d s1b s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s1a: BEGIN;
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
@ -276,9 +320,11 @@ step s1c: COMMIT;
starting permutation: s2a s2b s2c s1a s1b s2d s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); <waiting ...>
@ -289,9 +335,11 @@ step s1c: COMMIT;
starting permutation: s2a s2b s2c s1a s2d s1b s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s1a: BEGIN;
step s2d: COMMIT;
@ -301,9 +349,11 @@ step s1c: COMMIT;
starting permutation: s2a s2b s2c s2d s1a s1b s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
i
-
1
(1 row)
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
step s1a: BEGIN;

View File

@ -2,13 +2,17 @@ Parsed test spec with 4 sessions
starting permutation: d1a1 d2a2 e1l e2l d1a2 d2a1 d1c e1c d2c e2c
step d1a1: SELECT lock_share(1,x), lock_excl(3,x) FROM bigt LIMIT 1;
lock_share lock_excl
lock_share|lock_excl
----------+---------
1| 1
(1 row)
1 1
step d2a2: select lock_share(2,x) FROM bigt LIMIT 1;
lock_share
lock_share
----------
1
(1 row)
1
step e1l: SELECT lock_excl(1,x) FROM bigt LIMIT 1; <waiting ...>
step e2l: SELECT lock_excl(2,x) FROM bigt LIMIT 1; <waiting ...>
step d1a2: SET force_parallel_mode = on;
@ -30,25 +34,35 @@ step d2a1: SET force_parallel_mode = on;
RESET parallel_tuple_cost;
SELECT lock_share(3,x) FROM bigt LIMIT 1; <waiting ...>
step d1a2: <... completed>
sum
sum
-----
10000
(1 row)
10000
step d1c: COMMIT;
step e1l: <... completed>
lock_excl
lock_excl
---------
1
(1 row)
1
step d2a1: <... completed>
sum
sum
-----
10000
(1 row)
10000
lock_share
lock_share
----------
1
(1 row)
1
step e1c: COMMIT;
step d2c: COMMIT;
step e2l: <... completed>
lock_excl
lock_excl
---------
1
(1 row)
1
step e2c: COMMIT;

View File

@ -2,75 +2,99 @@ Parsed test spec with 2 sessions
starting permutation: s1l s1svp s1d s1r s2l s1c s2c
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1svp: SAVEPOINT f;
step s1d: SELECT * FROM foo FOR NO KEY UPDATE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1r: ROLLBACK TO f;
step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...>
step s1c: COMMIT;
step s2l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
starting permutation: s1l s1svp s1d s2l s1r s1c s2c
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1svp: SAVEPOINT f;
step s1d: SELECT * FROM foo FOR NO KEY UPDATE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...>
step s1r: ROLLBACK TO f;
step s1c: COMMIT;
step s2l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
starting permutation: s1l s1svp s1d s1r s2l2 s1c s2c
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1svp: SAVEPOINT f;
step s1d: SELECT * FROM foo FOR NO KEY UPDATE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1r: ROLLBACK TO f;
step s2l2: SELECT * FROM foo FOR NO KEY UPDATE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1c: COMMIT;
step s2c: COMMIT;
starting permutation: s1l s1svp s1d s2l2 s1r s1c s2c
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1svp: SAVEPOINT f;
step s1d: SELECT * FROM foo FOR NO KEY UPDATE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2l2: SELECT * FROM foo FOR NO KEY UPDATE; <waiting ...>
step s1r: ROLLBACK TO f;
step s2l2: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1c: COMMIT;
step s2c: COMMIT;

View File

@ -2,94 +2,118 @@ Parsed test spec with 2 sessions
starting permutation: s1l s1svp s1d s1r s1c s2l s2c
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1svp: SAVEPOINT f;
step s1d: DELETE FROM foo;
step s1r: ROLLBACK TO f;
step s1c: COMMIT;
step s2l: SELECT * FROM foo FOR UPDATE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
starting permutation: s1l s1svp s1d s1r s2l s1c s2c
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1svp: SAVEPOINT f;
step s1d: DELETE FROM foo;
step s1r: ROLLBACK TO f;
step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...>
step s1c: COMMIT;
step s2l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
starting permutation: s1l s1svp s1d s2l s1r s1c s2c
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1svp: SAVEPOINT f;
step s1d: DELETE FROM foo;
step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...>
step s1r: ROLLBACK TO f;
step s1c: COMMIT;
step s2l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
starting permutation: s1l s1svp s2l s1d s1r s1c s2c
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1svp: SAVEPOINT f;
step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...>
step s1d: DELETE FROM foo;
step s1r: ROLLBACK TO f;
step s1c: COMMIT;
step s2l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
starting permutation: s1l s2l s1svp s1d s1r s1c s2c
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...>
step s1svp: SAVEPOINT f;
step s1d: DELETE FROM foo;
step s1r: ROLLBACK TO f;
step s1c: COMMIT;
step s2l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
starting permutation: s2l s1l s2c s1svp s1d s1r s1c
step s2l: SELECT * FROM foo FOR UPDATE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1l: SELECT * FROM foo FOR KEY SHARE; <waiting ...>
step s2c: COMMIT;
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1svp: SAVEPOINT f;
step s1d: DELETE FROM foo;
step s1r: ROLLBACK TO f;
@ -97,14 +121,18 @@ step s1c: COMMIT;
starting permutation: s2l s2c s1l s1svp s1d s1r s1c
step s2l: SELECT * FROM foo FOR UPDATE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s1svp: SAVEPOINT f;
step s1d: DELETE FROM foo;
step s1r: ROLLBACK TO f;

View File

@ -3,120 +3,154 @@ Parsed test spec with 3 sessions
starting permutation: s1b s1s s2detach s1s s1c s1s
step s1b: BEGIN;
step s1s: SELECT * FROM d_listp;
a
a
-
1
2
(2 rows)
1
2
step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...>
step s1s: SELECT * FROM d_listp;
a
a
-
1
(1 row)
1
step s1c: COMMIT;
step s2detach: <... completed>
step s1s: SELECT * FROM d_listp;
a
a
-
1
(1 row)
1
starting permutation: s1b s1s s2detach s1s s3s s3i s1c s3i s2drop s1s
step s1b: BEGIN;
step s1s: SELECT * FROM d_listp;
a
a
-
1
2
(2 rows)
1
2
step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...>
step s1s: SELECT * FROM d_listp;
a
a
-
1
(1 row)
1
step s3s: SELECT * FROM d_listp;
a
a
-
1
(1 row)
1
step s3i: SELECT relpartbound IS NULL FROM pg_class where relname = 'd_listp2';
?column?
?column?
--------
f
(1 row)
f
step s1c: COMMIT;
step s2detach: <... completed>
step s3i: SELECT relpartbound IS NULL FROM pg_class where relname = 'd_listp2';
?column?
?column?
--------
t
(1 row)
t
step s2drop: DROP TABLE d_listp2;
step s1s: SELECT * FROM d_listp;
a
a
-
1
(1 row)
1
starting permutation: s1b s1s s2detach s1ins s1s s1c
step s1b: BEGIN;
step s1s: SELECT * FROM d_listp;
a
a
-
1
2
(2 rows)
1
2
step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...>
step s1ins: INSERT INTO d_listp VALUES (1);
step s1s: SELECT * FROM d_listp;
a
a
-
1
1
(2 rows)
1
1
step s1c: COMMIT;
step s2detach: <... completed>
starting permutation: s1b s1s s1ins2 s2detach s1ins s1s s1c
step s1b: BEGIN;
step s1s: SELECT * FROM d_listp;
a
a
-
1
2
(2 rows)
1
2
step s1ins2: INSERT INTO d_listp VALUES (2);
step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...>
step s1ins: INSERT INTO d_listp VALUES (1);
step s1s: SELECT * FROM d_listp;
a
a
-
1
1
(2 rows)
1
1
step s1c: COMMIT;
step s2detach: <... completed>
starting permutation: s1brr s1s s2detach s1ins s1s s1c
step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1s: SELECT * FROM d_listp;
a
a
-
1
2
(2 rows)
1
2
step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...>
step s1ins: INSERT INTO d_listp VALUES (1);
step s1s: SELECT * FROM d_listp;
a
a
-
1
1
2
(3 rows)
1
1
2
step s1c: COMMIT;
step s2detach: <... completed>
starting permutation: s1brr s1s s2detach s1s s1c
step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1s: SELECT * FROM d_listp;
a
a
-
1
2
(2 rows)
1
2
step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...>
step s1s: SELECT * FROM d_listp;
a
a
-
1
2
(2 rows)
1
2
step s1c: COMMIT;
step s2detach: <... completed>
@ -133,21 +167,27 @@ starting permutation: s1brr s1prep s1s s2detach s1s s1exec1 s3s s1dealloc s1c
step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1prep: PREPARE f(int) AS INSERT INTO d_listp VALUES ($1);
step s1s: SELECT * FROM d_listp;
a
a
-
1
2
(2 rows)
1
2
step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...>
step s1s: SELECT * FROM d_listp;
a
a
-
1
2
(2 rows)
1
2
step s1exec1: EXECUTE f(1);
step s3s: SELECT * FROM d_listp;
a
a
-
1
(1 row)
1
step s1dealloc: DEALLOCATE f;
step s1c: COMMIT;
step s2detach: <... completed>
@ -158,16 +198,20 @@ step s1prep: PREPARE f(int) AS INSERT INTO d_listp VALUES ($1);
step s1exec2: EXECUTE f(2);
step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...>
step s1s: SELECT * FROM d_listp;
a
a
-
1
2
2
(3 rows)
1
2
2
step s1exec2: EXECUTE f(2);
step s3s: SELECT * FROM d_listp;
a
a
-
1
(1 row)
1
step s1c: COMMIT;
step s2detach: <... completed>
step s1dealloc: DEALLOCATE f;
@ -176,16 +220,20 @@ starting permutation: s1brr s1prep s1s s2detach s1s s1exec2 s1c s1dealloc
step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1prep: PREPARE f(int) AS INSERT INTO d_listp VALUES ($1);
step s1s: SELECT * FROM d_listp;
a
a
-
1
2
(2 rows)
1
2
step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...>
step s1s: SELECT * FROM d_listp;
a
a
-
1
2
(2 rows)
1
2
step s1exec2: EXECUTE f(2);
step s1c: COMMIT;
step s2detach: <... completed>
@ -196,10 +244,12 @@ step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1prep: PREPARE f(int) AS INSERT INTO d_listp VALUES ($1);
step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...>
step s1s: SELECT * FROM d_listp;
a
a
-
1
2
(2 rows)
1
2
step s1exec2: EXECUTE f(2);
step s1c: COMMIT;
step s2detach: <... completed>
@ -210,10 +260,12 @@ step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1prep1: PREPARE f(int) AS INSERT INTO d_listp VALUES (1);
step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...>
step s1s: SELECT * FROM d_listp;
a
a
-
1
2
(2 rows)
1
2
step s1exec2: EXECUTE f(2);
step s1c: COMMIT;
step s2detach: <... completed>
@ -224,10 +276,12 @@ step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1prep2: PREPARE f(int) AS INSERT INTO d_listp VALUES (2);
step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...>
step s1s: SELECT * FROM d_listp;
a
a
-
1
2
(2 rows)
1
2
step s1exec2: EXECUTE f(2);
step s1c: COMMIT;
step s2detach: <... completed>

View File

@ -3,10 +3,12 @@ Parsed test spec with 3 sessions
starting permutation: s1b s1s s2d s3i1 s1c
step s1b: BEGIN;
step s1s: SELECT * FROM d_lp_fk;
a
a
-
1
2
(2 rows)
1
2
step s2d: ALTER TABLE d_lp_fk DETACH PARTITION d_lp_fk_1 CONCURRENTLY; <waiting ...>
step s3i1: INSERT INTO d_lp_fk_r VALUES (1);
ERROR: insert or update on table "d_lp_fk_r" violates foreign key constraint "d_lp_fk_r_a_fkey"
@ -16,10 +18,12 @@ step s2d: <... completed>
starting permutation: s1b s1s s2d s3i2 s3i2 s1c
step s1b: BEGIN;
step s1s: SELECT * FROM d_lp_fk;
a
a
-
1
2
(2 rows)
1
2
step s2d: ALTER TABLE d_lp_fk DETACH PARTITION d_lp_fk_1 CONCURRENTLY; <waiting ...>
step s3i2: INSERT INTO d_lp_fk_r VALUES (2);
step s3i2: INSERT INTO d_lp_fk_r VALUES (2);
@ -29,10 +33,12 @@ step s2d: <... completed>
starting permutation: s1b s1s s3i1 s2d s1c
step s1b: BEGIN;
step s1s: SELECT * FROM d_lp_fk;
a
a
-
1
2
(2 rows)
1
2
step s3i1: INSERT INTO d_lp_fk_r VALUES (1);
step s2d: ALTER TABLE d_lp_fk DETACH PARTITION d_lp_fk_1 CONCURRENTLY;
ERROR: removing partition "d_lp_fk_1" violates foreign key constraint "d_lp_fk_r_a_fkey1"
@ -41,10 +47,12 @@ step s1c: COMMIT;
starting permutation: s1b s1s s3i2 s2d s1c
step s1b: BEGIN;
step s1s: SELECT * FROM d_lp_fk;
a
a
-
1
2
(2 rows)
1
2
step s3i2: INSERT INTO d_lp_fk_r VALUES (2);
step s2d: ALTER TABLE d_lp_fk DETACH PARTITION d_lp_fk_1 CONCURRENTLY; <waiting ...>
step s1c: COMMIT;
@ -53,10 +61,12 @@ step s2d: <... completed>
starting permutation: s1b s1s s3b s2d s3i1 s1c s3c
step s1b: BEGIN;
step s1s: SELECT * FROM d_lp_fk;
a
a
-
1
2
(2 rows)
1
2
step s3b: BEGIN;
step s2d: ALTER TABLE d_lp_fk DETACH PARTITION d_lp_fk_1 CONCURRENTLY; <waiting ...>
step s3i1: INSERT INTO d_lp_fk_r VALUES (1);

View File

@ -4,24 +4,30 @@ starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s1describe s1alter
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1describe: SELECT 'd3_listp' AS root, * FROM pg_partition_tree('d3_listp')
UNION ALL SELECT 'd3_listp1', * FROM pg_partition_tree('d3_listp1');
root relid parentrelid isleaf level
root |relid |parentrelid|isleaf|level
---------+---------+-----------+------+-----
d3_listp |d3_listp | |f | 0
d3_listp |d3_listp2|d3_listp |t | 1
d3_listp1|d3_listp1| |t | 0
(3 rows)
d3_listp d3_listp f 0
d3_listp d3_listp2 d3_listp t 1
d3_listp1 d3_listp1 t 0
step s1alter: ALTER TABLE d3_listp1 ALTER a DROP NOT NULL;
ERROR: cannot alter partition "d3_listp1" with an incomplete detach
@ -29,14 +35,18 @@ starting permutation: s2snitch s1b s1s s2detach s1cancel s1insert s1c
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1insert: INSERT INTO d3_listp VALUES (1);
@ -47,36 +57,46 @@ starting permutation: s2snitch s1brr s1s s2detach s1cancel s1insert s1c s1spart
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1insert: INSERT INTO d3_listp VALUES (1);
step s1c: COMMIT;
step s1spart: SELECT * FROM d3_listp1;
a
a
-
1
1
(2 rows)
1
1
starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s1insertpart
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
@ -86,24 +106,30 @@ starting permutation: s2snitch s1b s1s s2detach2 s1cancel s1c s1brr s1insert s1s
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach2: ALTER TABLE d3_listp DETACH PARTITION d3_listp2 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach2: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1insert: INSERT INTO d3_listp VALUES (1);
step s1s: SELECT * FROM d3_listp;
a
a
-
1
1
(2 rows)
1
1
step s1insert: INSERT INTO d3_listp VALUES (1);
step s1c: COMMIT;
@ -111,84 +137,108 @@ starting permutation: s2snitch s1b s1s s2detach2 s1cancel s1c s1brr s1s s1insert
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach2: ALTER TABLE d3_listp DETACH PARTITION d3_listp2 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach2: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s1insert: INSERT INTO d3_listp VALUES (1);
step s1s: SELECT * FROM d3_listp;
a
a
-
1
1
(2 rows)
1
1
step s1c: COMMIT;
starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s1drop s1list
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1drop: DROP TABLE d3_listp;
step s1list: SELECT relname FROM pg_catalog.pg_class
WHERE relname LIKE 'd3_listp%' ORDER BY 1;
relname
relname
-------
(0 rows)
starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s1trunc s1spart
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1trunc: TRUNCATE TABLE d3_listp;
step s1spart: SELECT * FROM d3_listp1;
a
a
-
1
(1 row)
1
starting permutation: s2snitch s1b s1s s2detach s1cancel s1noop s2detach2 s1c
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1noop:
@ -200,14 +250,18 @@ starting permutation: s2snitch s1b s1s s2detach s1cancel s1noop s2detachfinal s1
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1noop:
@ -220,14 +274,18 @@ starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s1droppart s2detach
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
@ -238,14 +296,18 @@ starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s2begin s2drop s1s
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
@ -254,29 +316,37 @@ step s2drop: DROP TABLE d3_listp1;
step s1s: SELECT * FROM d3_listp; <waiting ...>
step s2commit: COMMIT;
step s1s: <... completed>
a
a
-
(0 rows)
starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s1b s1spart s2detachfinal s1c
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1b: BEGIN;
step s1spart: SELECT * FROM d3_listp1;
a
a
-
1
(1 row)
1
step s2detachfinal: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 FINALIZE; <waiting ...>
step s1c: COMMIT;
step s2detachfinal: <... completed>
@ -285,20 +355,26 @@ starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s1b s1s s2detachfin
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
(0 rows)
step s2detachfinal: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 FINALIZE;
step s1c: COMMIT;
@ -307,22 +383,28 @@ starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s1b s1spart s2detac
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
step s1b: BEGIN;
step s1spart: SELECT * FROM d3_listp1;
a
a
-
1
(1 row)
1
step s2detachfinal: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 FINALIZE; <waiting ...>
step s1c: COMMIT;
step s2detachfinal: <... completed>
@ -331,14 +413,18 @@ starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s2begin s2detachfin
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
@ -350,14 +436,18 @@ starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s2begin s2detachfin
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;
@ -366,22 +456,28 @@ step s2detachfinal: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 FINALIZE;
step s1spart: SELECT * FROM d3_listp1; <waiting ...>
step s2commit: COMMIT;
step s1spart: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s2begin s2detachfinal s1insertpart s2commit
step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid();
step s1b: BEGIN;
step s1s: SELECT * FROM d3_listp;
a
a
-
1
(1 row)
1
step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...>
step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: COMMIT;

View File

@ -4,15 +4,19 @@ starting permutation: s2snitch s1b s1s s2detach s1cancel s1insert s1c
step s2snitch: insert into d4_pid select pg_backend_pid();
step s1b: begin;
step s1s: select * from d4_primary;
a
a
-
1
2
(2 rows)
1
2
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1insert: insert into d4_fk values (1);
@ -23,10 +27,12 @@ starting permutation: s2snitch s1b s1s s2detach s1insert s1c
step s2snitch: insert into d4_pid select pg_backend_pid();
step s1b: begin;
step s1s: select * from d4_primary;
a
a
-
1
2
(2 rows)
1
2
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
@ -37,15 +43,19 @@ starting permutation: s2snitch s1brr s1s s2detach s1cancel s1insert s1c
step s2snitch: insert into d4_pid select pg_backend_pid();
step s1brr: begin isolation level repeatable read;
step s1s: select * from d4_primary;
a
a
-
1
2
(2 rows)
1
2
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1insert: insert into d4_fk values (1);
@ -56,10 +66,12 @@ starting permutation: s2snitch s1brr s1s s2detach s1insert s1c
step s2snitch: insert into d4_pid select pg_backend_pid();
step s1brr: begin isolation level repeatable read;
step s1s: select * from d4_primary;
a
a
-
1
2
(2 rows)
1
2
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
@ -73,15 +85,19 @@ step s1declare: declare f cursor for select * from d4_primary;
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1fetchall: fetch all from f;
a
a
-
1
2
(2 rows)
1
2
step s1insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
step s1c: commit;
@ -92,10 +108,12 @@ step s1b: begin;
step s1declare: declare f cursor for select * from d4_primary;
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1fetchall: fetch all from f;
a
a
-
1
2
(2 rows)
1
2
step s1insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
step s2detach: <... completed>
@ -108,8 +126,10 @@ step s1declare: declare f cursor for select * from d4_primary;
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1svpt: savepoint f;
@ -117,10 +137,12 @@ step s1insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
step s1rollback: rollback to f;
step s1fetchall: fetch all from f;
a
a
-
1
2
(2 rows)
1
2
step s1c: commit;
starting permutation: s2snitch s1b s1declare s2detach s1svpt s1insert s1rollback s1fetchall s1c
@ -133,10 +155,12 @@ step s1insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
step s1rollback: rollback to f;
step s1fetchall: fetch all from f;
a
a
-
1
2
(2 rows)
1
2
step s1c: commit;
step s2detach: <... completed>
@ -147,12 +171,16 @@ step s2detach: alter table d4_primary detach partition d4_primary1 concurrently;
step s1declare: declare f cursor for select * from d4_primary;
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s1fetchall: fetch all from f;
a
a
-
2
(1 row)
2
step s1insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
step s1c: commit;
@ -163,9 +191,11 @@ step s1b: begin;
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently;
step s1declare: declare f cursor for select * from d4_primary;
step s1fetchall: fetch all from f;
a
a
-
2
(1 row)
2
step s1insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
step s1c: commit;
@ -177,16 +207,20 @@ step s2detach: alter table d4_primary detach partition d4_primary1 concurrently;
step s1declare: declare f cursor for select * from d4_primary;
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s1svpt: savepoint f;
step s1insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
step s1rollback: rollback to f;
step s1fetchall: fetch all from f;
a
a
-
2
(1 row)
2
step s1c: commit;
starting permutation: s2snitch s1b s2detach s1declare s1svpt s1insert s1rollback s1fetchall s1c
@ -199,9 +233,11 @@ step s1insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
step s1rollback: rollback to f;
step s1fetchall: fetch all from f;
a
a
-
2
(1 row)
2
step s1c: commit;
starting permutation: s2snitch s1brr s1declare2 s1fetchone s2detach s1cancel s1updcur s1c
@ -209,14 +245,18 @@ step s2snitch: insert into d4_pid select pg_backend_pid();
step s1brr: begin isolation level repeatable read;
step s1declare2: declare f cursor for select * from d4_fk where a = 2;
step s1fetchone: fetch 1 from f;
a
a
-
2
(1 row)
2
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1updcur: update d4_fk set a = 1 where current of f;
@ -228,9 +268,11 @@ step s2snitch: insert into d4_pid select pg_backend_pid();
step s1brr: begin isolation level repeatable read;
step s1declare2: declare f cursor for select * from d4_fk where a = 2;
step s1fetchone: fetch 1 from f;
a
a
-
2
(1 row)
2
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1updcur: update d4_fk set a = 1 where current of f;
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
@ -242,9 +284,11 @@ step s2snitch: insert into d4_pid select pg_backend_pid();
step s1brr: begin isolation level repeatable read;
step s1declare2: declare f cursor for select * from d4_fk where a = 2;
step s1fetchone: fetch 1 from f;
a
a
-
2
(1 row)
2
step s1updcur: update d4_fk set a = 1 where current of f;
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1c: commit;
@ -255,10 +299,12 @@ starting permutation: s2snitch s1b s1s s2detach s3insert s1c
step s2snitch: insert into d4_pid select pg_backend_pid();
step s1b: begin;
step s1s: select * from d4_primary;
a
a
-
1
2
(2 rows)
1
2
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s3insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
@ -269,10 +315,12 @@ starting permutation: s2snitch s1b s1s s2detach s3brr s3insert s3commit s1cancel
step s2snitch: insert into d4_pid select pg_backend_pid();
step s1b: begin;
step s1s: select * from d4_primary;
a
a
-
1
2
(2 rows)
1
2
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s3brr: begin isolation level repeatable read;
step s3insert: insert into d4_fk values (1);
@ -280,8 +328,10 @@ ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk
step s3commit: commit;
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1c: commit;
@ -290,10 +340,12 @@ starting permutation: s2snitch s1b s1s s2detach s3brr s3insert s3commit s1c
step s2snitch: insert into d4_pid select pg_backend_pid();
step s1b: begin;
step s1s: select * from d4_primary;
a
a
-
1
2
(2 rows)
1
2
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s3brr: begin isolation level repeatable read;
step s3insert: insert into d4_fk values (1);
@ -306,24 +358,30 @@ starting permutation: s2snitch s1brr s1s s2detach s1cancel s1noop s3vacfreeze s1
step s2snitch: insert into d4_pid select pg_backend_pid();
step s1brr: begin isolation level repeatable read;
step s1s: select * from d4_primary;
a
a
-
1
2
(2 rows)
1
2
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1noop:
step s3vacfreeze: vacuum freeze pg_catalog.pg_inherits;
step s1s: select * from d4_primary;
a
a
-
1
2
(2 rows)
1
2
step s1insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
step s1c: commit;
@ -332,23 +390,29 @@ starting permutation: s2snitch s1b s1s s2detach s1cancel s1noop s3vacfreeze s1s
step s2snitch: insert into d4_pid select pg_backend_pid();
step s1b: begin;
step s1s: select * from d4_primary;
a
a
-
1
2
(2 rows)
1
2
step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...>
step s1cancel: select pg_cancel_backend(pid) from d4_pid;
pg_cancel_backend
-----------------
t
(1 row)
t
step s2detach: <... completed>
ERROR: canceling statement due to user request
step s1noop:
step s3vacfreeze: vacuum freeze pg_catalog.pg_inherits;
step s1s: select * from d4_primary;
a
a
-
2
(1 row)
2
step s1insert: insert into d4_fk values (1);
ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey"
step s1c: commit;

View File

@ -4,41 +4,53 @@ starting permutation: noseq chkiso prepi preps begin explaini explains select2 d
step noseq: SET enable_seqscan = false;
step chkiso: SELECT (setting in ('read committed','read uncommitted')) AS is_read_committed FROM pg_settings WHERE name = 'default_transaction_isolation';
is_read_committed
-----------------
t
(1 row)
t
step prepi: PREPARE getrow_idx AS SELECT * FROM test_dc WHERE data=34 ORDER BY id,data;
step preps: PREPARE getrow_seq AS SELECT * FROM test_dc WHERE data::text=34::text ORDER BY id,data;
step begin: BEGIN;
step explaini: EXPLAIN (COSTS OFF) EXECUTE getrow_idx;
QUERY PLAN
Sort
Sort Key: id
QUERY PLAN
----------------------------------------------
Sort
Sort Key: id
-> Index Scan using test_dc_data on test_dc
Index Cond: (data = 34)
Index Cond: (data = 34)
(4 rows)
step explains: EXPLAIN (COSTS OFF) EXECUTE getrow_seq;
QUERY PLAN
Sort
Sort Key: id, data
QUERY PLAN
----------------------------------------------
Sort
Sort Key: id, data
-> Index Scan using test_dc_pkey on test_dc
Filter: ((data)::text = '34'::text)
step select2: SELECT * FROM test_dc WHERE data=34 ORDER BY id,data;
id data
Filter: ((data)::text = '34'::text)
(4 rows)
step select2: SELECT * FROM test_dc WHERE data=34 ORDER BY id,data;
id|data
--+----
34| 34
(1 row)
34 34
step drop: DROP INDEX CONCURRENTLY test_dc_data; <waiting ...>
step insert2: INSERT INTO test_dc(data) SELECT * FROM generate_series(1, 100);
step end2: COMMIT;
step selecti: EXECUTE getrow_idx;
id data
id|data
---+----
34| 34
134| 34
(2 rows)
34 34
134 34
step selects: EXECUTE getrow_seq;
id data
id|data
---+----
34| 34
134| 34
(2 rows)
34 34
134 34
step end: COMMIT;
step drop: <... completed>

View File

@ -4,39 +4,51 @@ starting permutation: noseq chkiso prepi preps begin explaini explains select2 d
step noseq: SET enable_seqscan = false;
step chkiso: SELECT (setting in ('read committed','read uncommitted')) AS is_read_committed FROM pg_settings WHERE name = 'default_transaction_isolation';
is_read_committed
-----------------
f
(1 row)
f
step prepi: PREPARE getrow_idx AS SELECT * FROM test_dc WHERE data=34 ORDER BY id,data;
step preps: PREPARE getrow_seq AS SELECT * FROM test_dc WHERE data::text=34::text ORDER BY id,data;
step begin: BEGIN;
step explaini: EXPLAIN (COSTS OFF) EXECUTE getrow_idx;
QUERY PLAN
Sort
Sort Key: id
QUERY PLAN
----------------------------------------------
Sort
Sort Key: id
-> Index Scan using test_dc_data on test_dc
Index Cond: (data = 34)
Index Cond: (data = 34)
(4 rows)
step explains: EXPLAIN (COSTS OFF) EXECUTE getrow_seq;
QUERY PLAN
Sort
Sort Key: id, data
QUERY PLAN
----------------------------------------------
Sort
Sort Key: id, data
-> Index Scan using test_dc_pkey on test_dc
Filter: ((data)::text = '34'::text)
step select2: SELECT * FROM test_dc WHERE data=34 ORDER BY id,data;
id data
Filter: ((data)::text = '34'::text)
(4 rows)
step select2: SELECT * FROM test_dc WHERE data=34 ORDER BY id,data;
id|data
--+----
34| 34
(1 row)
34 34
step drop: DROP INDEX CONCURRENTLY test_dc_data; <waiting ...>
step insert2: INSERT INTO test_dc(data) SELECT * FROM generate_series(1, 100);
step end2: COMMIT;
step selecti: EXECUTE getrow_idx;
id data
id|data
--+----
34| 34
(1 row)
34 34
step selects: EXECUTE getrow_seq;
id data
id|data
--+----
34| 34
(1 row)
34 34
step end: COMMIT;
step drop: <... completed>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -14,9 +14,11 @@ starting permutation: s1b s1d s2bs s2i s1c s2c
step s1b: begin;
step s1d: delete from ppk where a = 1;
step s2bs: begin isolation level serializable; select 1;
?column?
?column?
--------
1
(1 row)
1
step s2i: insert into pfk values (1); <waiting ...>
step s1c: commit;
step s2i: <... completed>
@ -36,9 +38,11 @@ step s2c: commit;
starting permutation: s1b s2bs s1d s2i s1c s2c
step s1b: begin;
step s2bs: begin isolation level serializable; select 1;
?column?
?column?
--------
1
(1 row)
1
step s1d: delete from ppk where a = 1;
step s2i: insert into pfk values (1); <waiting ...>
step s1c: commit;
@ -59,9 +63,11 @@ step s1c: commit;
starting permutation: s1b s2bs s2i s1d s2c s1c
step s1b: begin;
step s2bs: begin isolation level serializable; select 1;
?column?
?column?
--------
1
(1 row)
1
step s2i: insert into pfk values (1);
step s1d: delete from ppk where a = 1; <waiting ...>
step s2c: commit;

View File

@ -6,13 +6,17 @@ step s2_begin: BEGIN;
step s3_begin: BEGIN;
step s1_update: UPDATE tab_freeze SET x = x + 1 WHERE id = 3;
step s2_key_share: SELECT id FROM tab_freeze WHERE id = 3 FOR KEY SHARE;
id
id
--
3
(1 row)
3
step s3_key_share: SELECT id FROM tab_freeze WHERE id = 3 FOR KEY SHARE;
id
id
--
3
(1 row)
3
step s1_update: UPDATE tab_freeze SET x = x + 1 WHERE id = 3;
step s1_commit: COMMIT;
step s2_commit: COMMIT;
@ -24,13 +28,17 @@ step s1_selectone:
SELECT * FROM tab_freeze WHERE id = 3;
COMMIT;
id name x
id|name|x
--+----+-
3| 333|2
(1 row)
3 333 2
step s3_commit: COMMIT;
step s2_vacuum: VACUUM FREEZE tab_freeze;
step s1_selectall: SELECT * FROM tab_freeze ORDER BY name, id;
id name x
id|name|x
--+----+-
1| 111|0
3| 333|2
(2 rows)
1 111 0
3 333 2

View File

@ -9,31 +9,39 @@ step ll_start:
BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SELECT 1;
?column?
?column?
--------
1
(1 row)
1
step pruner_query_plan:
EXPLAIN (COSTS OFF) SELECT * FROM horizons_tst ORDER BY data;
QUERY PLAN
QUERY PLAN
-----------------------------------------------------------
Index Only Scan using horizons_tst_data_key on horizons_tst
(1 row)
step pruner_query:
SELECT explain_json($$
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step pruner_query:
SELECT explain_json($$
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step pruner_delete:
DELETE FROM horizons_tst;
@ -42,17 +50,21 @@ step pruner_query:
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step pruner_query:
SELECT explain_json($$
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step ll_commit: COMMIT;
step pruner_drop:
DROP TABLE horizons_tst;
@ -67,31 +79,39 @@ step ll_start:
BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SELECT 1;
?column?
?column?
--------
1
(1 row)
1
step pruner_query_plan:
EXPLAIN (COSTS OFF) SELECT * FROM horizons_tst ORDER BY data;
QUERY PLAN
QUERY PLAN
-----------------------------------------------------------
Index Only Scan using horizons_tst_data_key on horizons_tst
(1 row)
step pruner_query:
SELECT explain_json($$
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step pruner_query:
SELECT explain_json($$
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step pruner_delete:
DELETE FROM horizons_tst;
@ -100,17 +120,21 @@ step pruner_query:
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step pruner_query:
SELECT explain_json($$
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
0
(1 row)
0
step ll_commit: COMMIT;
step pruner_drop:
DROP TABLE horizons_tst;
@ -125,25 +149,31 @@ step ll_start:
BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SELECT 1;
?column?
?column?
--------
1
(1 row)
1
step pruner_query:
SELECT explain_json($$
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step pruner_query:
SELECT explain_json($$
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step pruner_begin: BEGIN;
step pruner_delete:
DELETE FROM horizons_tst;
@ -153,17 +183,21 @@ step pruner_query:
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step pruner_query:
SELECT explain_json($$
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step ll_commit: COMMIT;
step pruner_commit: COMMIT;
step pruner_drop:
@ -179,25 +213,31 @@ step ll_start:
BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SELECT 1;
?column?
?column?
--------
1
(1 row)
1
step pruner_query:
SELECT explain_json($$
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step pruner_query:
SELECT explain_json($$
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step pruner_delete:
DELETE FROM horizons_tst;
@ -209,17 +249,21 @@ step pruner_query:
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step pruner_query:
SELECT explain_json($$
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step ll_commit: COMMIT;
step pruner_drop:
DROP TABLE horizons_tst;
@ -234,25 +278,31 @@ step ll_start:
BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SELECT 1;
?column?
?column?
--------
1
(1 row)
1
step pruner_query:
SELECT explain_json($$
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step pruner_query:
SELECT explain_json($$
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
2
(1 row)
2
step pruner_delete:
DELETE FROM horizons_tst;
@ -264,17 +314,21 @@ step pruner_query:
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
0
(1 row)
0
step pruner_query:
SELECT explain_json($$
EXPLAIN (FORMAT json, BUFFERS, ANALYZE)
SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches';
?column?
?column?
--------
0
(1 row)
0
step ll_commit: COMMIT;
step pruner_drop:
DROP TABLE horizons_tst;

View File

@ -5,29 +5,37 @@ step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2);
step s1_insert_c: INSERT INTO inh_temp_child_s1 VALUES (3), (4);
step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6);
step s1_select_p: SELECT a FROM inh_parent;
a
a
-
1
2
3
4
(4 rows)
1
2
3
4
step s1_select_c: SELECT a FROM inh_temp_child_s1;
a
a
-
3
4
(2 rows)
3
4
step s2_select_p: SELECT a FROM inh_parent;
a
a
-
1
2
5
6
(4 rows)
1
2
5
6
step s2_select_c: SELECT a FROM inh_temp_child_s2;
a
a
-
5
6
(2 rows)
5
6
starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_update_p s1_update_c s1_select_p s1_select_c s2_select_p s2_select_c
step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2);
@ -36,29 +44,37 @@ step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6);
step s1_update_p: UPDATE inh_parent SET a = 11 WHERE a = 1;
step s1_update_c: UPDATE inh_parent SET a = 13 WHERE a IN (3, 5);
step s1_select_p: SELECT a FROM inh_parent;
a
a
--
2
11
4
13
(4 rows)
2
11
4
13
step s1_select_c: SELECT a FROM inh_temp_child_s1;
a
a
--
4
13
(2 rows)
4
13
step s2_select_p: SELECT a FROM inh_parent;
a
a
--
2
11
5
6
(4 rows)
2
11
5
6
step s2_select_c: SELECT a FROM inh_temp_child_s2;
a
a
-
5
6
(2 rows)
5
6
starting permutation: s1_insert_p s1_insert_c s2_insert_c s2_update_c s1_select_p s1_select_c s2_select_p s2_select_c
step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2);
@ -66,29 +82,37 @@ step s1_insert_c: INSERT INTO inh_temp_child_s1 VALUES (3), (4);
step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6);
step s2_update_c: UPDATE inh_parent SET a = 15 WHERE a IN (3, 5);
step s1_select_p: SELECT a FROM inh_parent;
a
a
-
1
2
3
4
(4 rows)
1
2
3
4
step s1_select_c: SELECT a FROM inh_temp_child_s1;
a
a
-
3
4
(2 rows)
3
4
step s2_select_p: SELECT a FROM inh_parent;
a
a
--
1
2
6
15
(4 rows)
1
2
6
15
step s2_select_c: SELECT a FROM inh_temp_child_s2;
a
a
--
6
15
(2 rows)
6
15
starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_delete_p s1_delete_c s1_select_p s1_select_c s2_select_p s2_select_c
step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2);
@ -97,25 +121,33 @@ step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6);
step s1_delete_p: DELETE FROM inh_parent WHERE a = 2;
step s1_delete_c: DELETE FROM inh_parent WHERE a IN (4, 6);
step s1_select_p: SELECT a FROM inh_parent;
a
a
-
1
3
(2 rows)
1
3
step s1_select_c: SELECT a FROM inh_temp_child_s1;
a
a
-
3
(1 row)
3
step s2_select_p: SELECT a FROM inh_parent;
a
a
-
1
5
6
(3 rows)
1
5
6
step s2_select_c: SELECT a FROM inh_temp_child_s2;
a
a
-
5
6
(2 rows)
5
6
starting permutation: s1_insert_p s1_insert_c s2_insert_c s2_delete_c s1_select_p s1_select_c s2_select_p s2_select_c
step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2);
@ -123,27 +155,35 @@ step s1_insert_c: INSERT INTO inh_temp_child_s1 VALUES (3), (4);
step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6);
step s2_delete_c: DELETE FROM inh_parent WHERE a IN (4, 6);
step s1_select_p: SELECT a FROM inh_parent;
a
a
-
1
2
3
4
(4 rows)
1
2
3
4
step s1_select_c: SELECT a FROM inh_temp_child_s1;
a
a
-
3
4
(2 rows)
3
4
step s2_select_p: SELECT a FROM inh_parent;
a
a
-
1
2
5
(3 rows)
1
2
5
step s2_select_c: SELECT a FROM inh_temp_child_s2;
a
a
-
5
(1 row)
5
starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_truncate_p s1_select_p s1_select_c s2_select_p s2_select_c
step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2);
@ -151,21 +191,29 @@ step s1_insert_c: INSERT INTO inh_temp_child_s1 VALUES (3), (4);
step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6);
step s1_truncate_p: TRUNCATE inh_parent;
step s1_select_p: SELECT a FROM inh_parent;
a
a
-
(0 rows)
step s1_select_c: SELECT a FROM inh_temp_child_s1;
a
a
-
(0 rows)
step s2_select_p: SELECT a FROM inh_parent;
a
a
-
5
6
(2 rows)
5
6
step s2_select_c: SELECT a FROM inh_temp_child_s2;
a
a
-
5
6
(2 rows)
5
6
starting permutation: s1_insert_p s1_insert_c s2_insert_c s2_truncate_p s1_select_p s1_select_c s2_select_p s2_select_c
step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2);
@ -173,20 +221,28 @@ step s1_insert_c: INSERT INTO inh_temp_child_s1 VALUES (3), (4);
step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6);
step s2_truncate_p: TRUNCATE inh_parent;
step s1_select_p: SELECT a FROM inh_parent;
a
a
-
3
4
(2 rows)
3
4
step s1_select_c: SELECT a FROM inh_temp_child_s1;
a
a
-
3
4
(2 rows)
3
4
step s2_select_p: SELECT a FROM inh_parent;
a
a
-
(0 rows)
step s2_select_c: SELECT a FROM inh_temp_child_s2;
a
a
-
(0 rows)
starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_begin s1_truncate_p s2_select_p s1_commit
@ -198,10 +254,12 @@ step s1_truncate_p: TRUNCATE inh_parent;
step s2_select_p: SELECT a FROM inh_parent; <waiting ...>
step s1_commit: COMMIT;
step s2_select_p: <... completed>
a
a
-
5
6
(2 rows)
5
6
starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_begin s1_truncate_p s2_select_c s1_commit
step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2);
@ -210,8 +268,10 @@ step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6);
step s1_begin: BEGIN;
step s1_truncate_p: TRUNCATE inh_parent;
step s2_select_c: SELECT a FROM inh_temp_child_s2;
a
a
-
5
6
(2 rows)
5
6
step s1_commit: COMMIT;

View File

@ -8,9 +8,11 @@ step c1: COMMIT;
step donothing2: INSERT INTO ints(key, val) VALUES(1, 'donothing2'), (1, 'donothing3') ON CONFLICT DO NOTHING;
step c2: COMMIT;
step show: SELECT * FROM ints;
key val
key|val
---+----------
1|donothing1
(1 row)
1 donothing1
starting permutation: beginrr1 beginrr2 donothing2 c2 donothing1 c1 show
step beginrr1: BEGIN ISOLATION LEVEL REPEATABLE READ;
@ -20,9 +22,11 @@ step c2: COMMIT;
step donothing1: INSERT INTO ints(key, val) VALUES(1, 'donothing1') ON CONFLICT DO NOTHING;
step c1: COMMIT;
step show: SELECT * FROM ints;
key val
key|val
---+----------
1|donothing2
(1 row)
1 donothing2
starting permutation: beginrr1 beginrr2 donothing1 donothing2 c1 c2 show
step beginrr1: BEGIN ISOLATION LEVEL REPEATABLE READ;
@ -34,9 +38,11 @@ step donothing2: <... completed>
ERROR: could not serialize access due to concurrent update
step c2: COMMIT;
step show: SELECT * FROM ints;
key val
key|val
---+----------
1|donothing1
(1 row)
1 donothing1
starting permutation: beginrr1 beginrr2 donothing2 donothing1 c2 c1 show
step beginrr1: BEGIN ISOLATION LEVEL REPEATABLE READ;
@ -48,9 +54,11 @@ step donothing1: <... completed>
ERROR: could not serialize access due to concurrent update
step c1: COMMIT;
step show: SELECT * FROM ints;
key val
key|val
---+----------
1|donothing2
(1 row)
1 donothing2
starting permutation: begins1 begins2 donothing1 c1 donothing2 c2 show
step begins1: BEGIN ISOLATION LEVEL SERIALIZABLE;
@ -60,9 +68,11 @@ step c1: COMMIT;
step donothing2: INSERT INTO ints(key, val) VALUES(1, 'donothing2'), (1, 'donothing3') ON CONFLICT DO NOTHING;
step c2: COMMIT;
step show: SELECT * FROM ints;
key val
key|val
---+----------
1|donothing1
(1 row)
1 donothing1
starting permutation: begins1 begins2 donothing2 c2 donothing1 c1 show
step begins1: BEGIN ISOLATION LEVEL SERIALIZABLE;
@ -72,9 +82,11 @@ step c2: COMMIT;
step donothing1: INSERT INTO ints(key, val) VALUES(1, 'donothing1') ON CONFLICT DO NOTHING;
step c1: COMMIT;
step show: SELECT * FROM ints;
key val
key|val
---+----------
1|donothing2
(1 row)
1 donothing2
starting permutation: begins1 begins2 donothing1 donothing2 c1 c2 show
step begins1: BEGIN ISOLATION LEVEL SERIALIZABLE;
@ -86,9 +98,11 @@ step donothing2: <... completed>
ERROR: could not serialize access due to concurrent update
step c2: COMMIT;
step show: SELECT * FROM ints;
key val
key|val
---+----------
1|donothing1
(1 row)
1 donothing1
starting permutation: begins1 begins2 donothing2 donothing1 c2 c1 show
step begins1: BEGIN ISOLATION LEVEL SERIALIZABLE;
@ -100,6 +114,8 @@ step donothing1: <... completed>
ERROR: could not serialize access due to concurrent update
step c1: COMMIT;
step show: SELECT * FROM ints;
key val
key|val
---+----------
1|donothing2
(1 row)
1 donothing2

View File

@ -6,9 +6,11 @@ step donothing2: INSERT INTO ints(key, val) VALUES(1, 'donothing2') ON CONFLICT
step c1: COMMIT;
step donothing2: <... completed>
step select2: SELECT * FROM ints;
key val
key|val
---+----------
1|donothing1
(1 row)
1 donothing1
step c2: COMMIT;
starting permutation: donothing1 donothing2 a1 select2 c2
@ -17,7 +19,9 @@ step donothing2: INSERT INTO ints(key, val) VALUES(1, 'donothing2') ON CONFLICT
step a1: ABORT;
step donothing2: <... completed>
step select2: SELECT * FROM ints;
key val
key|val
---+----------
1|donothing2
(1 row)
1 donothing2
step c2: COMMIT;

View File

@ -6,9 +6,11 @@ step insert2: INSERT INTO upsert(key, payload) VALUES('FOOFOO', 'insert2') ON CO
step c1: COMMIT;
step insert2: <... completed>
step select2: SELECT * FROM upsert;
key payload
key |payload
------+--------------------------
FOOFOO|insert1 updated by insert2
(1 row)
FOOFOO insert1 updated by insert2
step c2: COMMIT;
starting permutation: insert1 insert2 a1 select2 c2
@ -17,7 +19,9 @@ step insert2: INSERT INTO upsert(key, payload) VALUES('FOOFOO', 'insert2') ON CO
step a1: ABORT;
step insert2: <... completed>
step select2: SELECT * FROM upsert;
key payload
key |payload
------+-------
FOOFOO|insert2
(1 row)
FOOFOO insert2
step c2: COMMIT;

View File

@ -12,15 +12,19 @@ step insert1:
SELECT * FROM colors ORDER BY key; <waiting ...>
step c2: COMMIT;
step insert1: <... completed>
key color is_active
key|color|is_active
---+-----+---------
1|Red |f
2|Green|f
3|Blue |f
(3 rows)
1 Red f
2 Green f
3 Blue f
step select1surprise: SELECT * FROM colors ORDER BY key;
key color is_active
key|color|is_active
---+-----+---------
1|Brown|t
2|Green|f
3|Blue |f
(3 rows)
1 Brown t
2 Green f
3 Blue f
step c1: COMMIT;

View File

@ -6,9 +6,11 @@ step insert2: INSERT INTO upsert(key, val) VALUES(1, 'insert2') ON CONFLICT (key
step c1: COMMIT;
step insert2: <... completed>
step select2: SELECT * FROM upsert;
key val
key|val
---+--------------------------
1|insert1 updated by insert2
(1 row)
1 insert1 updated by insert2
step c2: COMMIT;
starting permutation: insert1 insert2 a1 select2 c2
@ -17,7 +19,9 @@ step insert2: INSERT INTO upsert(key, val) VALUES(1, 'insert2') ON CONFLICT (key
step a1: ABORT;
step insert2: <... completed>
step select2: SELECT * FROM upsert;
key val
key|val
---+-------
1|insert2
(1 row)
1 insert2
step c2: COMMIT;

View File

@ -2,16 +2,20 @@ Parsed test spec with 3 sessions
starting permutation: controller_locks controller_show s1_upsert s2_upsert controller_show controller_unlock_1_1 controller_unlock_2_1 controller_unlock_1_3 controller_unlock_2_3 controller_show controller_unlock_2_2 controller_show controller_unlock_1_2 controller_show
step controller_locks: SELECT pg_advisory_lock(sess, lock), sess, lock FROM generate_series(1, 2) a(sess), generate_series(1,3) b(lock);
pg_advisory_locksess lock
pg_advisory_lock|sess|lock
----------------+----+----
| 1| 1
| 1| 2
| 1| 3
| 2| 1
| 2| 2
| 2| 3
(6 rows)
1 1
1 2
1 3
2 1
2 2
2 3
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
s1: NOTICE: blurt_and_lock_123() called for k1 in session 1
s1: NOTICE: acquiring advisory lock on 3
@ -20,66 +24,90 @@ s2: NOTICE: blurt_and_lock_123() called for k1 in session 2
s2: NOTICE: acquiring advisory lock on 3
step s2_upsert: INSERT INTO upserttest(key, data) VALUES('k1', 'inserted s2') ON CONFLICT (blurt_and_lock_123(key)) DO UPDATE SET data = upserttest.data || ' with conflict update s2'; <waiting ...>
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
step controller_unlock_1_1: SELECT pg_advisory_unlock(1, 1);
pg_advisory_unlock
------------------
t
(1 row)
t
step controller_unlock_2_1: SELECT pg_advisory_unlock(2, 1);
pg_advisory_unlock
------------------
t
(1 row)
t
step controller_unlock_1_3: SELECT pg_advisory_unlock(1, 3);
pg_advisory_unlock
------------------
t
(1 row)
t
s1: NOTICE: blurt_and_lock_123() called for k1 in session 1
s1: NOTICE: acquiring advisory lock on 2
step controller_unlock_2_3: SELECT pg_advisory_unlock(2, 3);
pg_advisory_unlock
------------------
t
(1 row)
t
s2: NOTICE: blurt_and_lock_123() called for k1 in session 2
s2: NOTICE: acquiring advisory lock on 2
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
step controller_unlock_2_2: SELECT pg_advisory_unlock(2, 2);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2_upsert: <... completed>
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+-----------
k1 |inserted s2
(1 row)
k1 inserted s2
step controller_unlock_1_2: SELECT pg_advisory_unlock(1, 2);
pg_advisory_unlock
------------------
t
(1 row)
t
s1: NOTICE: blurt_and_lock_123() called for k1 in session 1
s1: NOTICE: acquiring advisory lock on 2
s1: NOTICE: blurt_and_lock_123() called for k1 in session 1
s1: NOTICE: acquiring advisory lock on 2
step s1_upsert: <... completed>
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+-----------------------------------
k1 |inserted s2 with conflict update s1
(1 row)
k1 inserted s2 with conflict update s1
starting permutation: controller_locks controller_show s1_upsert s2_upsert controller_show controller_unlock_1_1 controller_unlock_2_1 controller_unlock_1_3 controller_unlock_2_3 controller_show controller_unlock_1_2 controller_show controller_unlock_2_2 controller_show
step controller_locks: SELECT pg_advisory_lock(sess, lock), sess, lock FROM generate_series(1, 2) a(sess), generate_series(1,3) b(lock);
pg_advisory_locksess lock
pg_advisory_lock|sess|lock
----------------+----+----
| 1| 1
| 1| 2
| 1| 3
| 2| 1
| 2| 2
| 2| 3
(6 rows)
1 1
1 2
1 3
2 1
2 2
2 3
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
s1: NOTICE: blurt_and_lock_123() called for k1 in session 1
s1: NOTICE: acquiring advisory lock on 3
@ -88,66 +116,90 @@ s2: NOTICE: blurt_and_lock_123() called for k1 in session 2
s2: NOTICE: acquiring advisory lock on 3
step s2_upsert: INSERT INTO upserttest(key, data) VALUES('k1', 'inserted s2') ON CONFLICT (blurt_and_lock_123(key)) DO UPDATE SET data = upserttest.data || ' with conflict update s2'; <waiting ...>
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
step controller_unlock_1_1: SELECT pg_advisory_unlock(1, 1);
pg_advisory_unlock
------------------
t
(1 row)
t
step controller_unlock_2_1: SELECT pg_advisory_unlock(2, 1);
pg_advisory_unlock
------------------
t
(1 row)
t
step controller_unlock_1_3: SELECT pg_advisory_unlock(1, 3);
pg_advisory_unlock
------------------
t
(1 row)
t
s1: NOTICE: blurt_and_lock_123() called for k1 in session 1
s1: NOTICE: acquiring advisory lock on 2
step controller_unlock_2_3: SELECT pg_advisory_unlock(2, 3);
pg_advisory_unlock
------------------
t
(1 row)
t
s2: NOTICE: blurt_and_lock_123() called for k1 in session 2
s2: NOTICE: acquiring advisory lock on 2
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
step controller_unlock_1_2: SELECT pg_advisory_unlock(1, 2);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1_upsert: <... completed>
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+-----------
k1 |inserted s1
(1 row)
k1 inserted s1
step controller_unlock_2_2: SELECT pg_advisory_unlock(2, 2);
pg_advisory_unlock
------------------
t
(1 row)
t
s2: NOTICE: blurt_and_lock_123() called for k1 in session 2
s2: NOTICE: acquiring advisory lock on 2
s2: NOTICE: blurt_and_lock_123() called for k1 in session 2
s2: NOTICE: acquiring advisory lock on 2
step s2_upsert: <... completed>
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+-----------------------------------
k1 |inserted s1 with conflict update s2
(1 row)
k1 inserted s1 with conflict update s2
starting permutation: controller_locks controller_show s1_insert_toast s2_insert_toast controller_show controller_unlock_1_1 controller_unlock_2_1 controller_unlock_1_3 controller_unlock_2_3 controller_show controller_unlock_1_2 controller_show_count controller_unlock_2_2 controller_show_count
step controller_locks: SELECT pg_advisory_lock(sess, lock), sess, lock FROM generate_series(1, 2) a(sess), generate_series(1,3) b(lock);
pg_advisory_locksess lock
pg_advisory_lock|sess|lock
----------------+----+----
| 1| 1
| 1| 2
| 1| 3
| 2| 1
| 2| 2
| 2| 3
(6 rows)
1 1
1 2
1 3
2 1
2 2
2 3
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
s1: NOTICE: blurt_and_lock_123() called for k2 in session 1
s1: NOTICE: acquiring advisory lock on 3
@ -156,66 +208,90 @@ s2: NOTICE: blurt_and_lock_123() called for k2 in session 2
s2: NOTICE: acquiring advisory lock on 3
step s2_insert_toast: INSERT INTO upserttest VALUES('k2', ctoast_large_val()) ON CONFLICT DO NOTHING; <waiting ...>
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
step controller_unlock_1_1: SELECT pg_advisory_unlock(1, 1);
pg_advisory_unlock
------------------
t
(1 row)
t
step controller_unlock_2_1: SELECT pg_advisory_unlock(2, 1);
pg_advisory_unlock
------------------
t
(1 row)
t
step controller_unlock_1_3: SELECT pg_advisory_unlock(1, 3);
pg_advisory_unlock
------------------
t
(1 row)
t
s1: NOTICE: blurt_and_lock_123() called for k2 in session 1
s1: NOTICE: acquiring advisory lock on 2
step controller_unlock_2_3: SELECT pg_advisory_unlock(2, 3);
pg_advisory_unlock
------------------
t
(1 row)
t
s2: NOTICE: blurt_and_lock_123() called for k2 in session 2
s2: NOTICE: acquiring advisory lock on 2
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
step controller_unlock_1_2: SELECT pg_advisory_unlock(1, 2);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1_insert_toast: <... completed>
step controller_show_count: SELECT COUNT(*) FROM upserttest;
count
count
-----
1
(1 row)
1
step controller_unlock_2_2: SELECT pg_advisory_unlock(2, 2);
pg_advisory_unlock
------------------
t
(1 row)
t
s2: NOTICE: blurt_and_lock_123() called for k2 in session 2
s2: NOTICE: acquiring advisory lock on 2
s2: NOTICE: blurt_and_lock_123() called for k2 in session 2
s2: NOTICE: acquiring advisory lock on 2
step s2_insert_toast: <... completed>
step controller_show_count: SELECT COUNT(*) FROM upserttest;
count
count
-----
1
(1 row)
1
starting permutation: controller_locks controller_show s1_begin s2_begin s1_upsert s2_upsert controller_show controller_unlock_1_1 controller_unlock_2_1 controller_unlock_1_3 controller_unlock_2_3 controller_show controller_unlock_1_2 controller_show controller_unlock_2_2 controller_show s1_commit controller_show s2_commit controller_show
step controller_locks: SELECT pg_advisory_lock(sess, lock), sess, lock FROM generate_series(1, 2) a(sess), generate_series(1,3) b(lock);
pg_advisory_locksess lock
pg_advisory_lock|sess|lock
----------------+----+----
| 1| 1
| 1| 2
| 1| 3
| 2| 1
| 2| 2
| 2| 3
(6 rows)
1 1
1 2
1 3
2 1
2 2
2 3
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
step s1_begin: BEGIN;
step s2_begin: BEGIN;
@ -226,81 +302,111 @@ s2: NOTICE: blurt_and_lock_123() called for k1 in session 2
s2: NOTICE: acquiring advisory lock on 3
step s2_upsert: INSERT INTO upserttest(key, data) VALUES('k1', 'inserted s2') ON CONFLICT (blurt_and_lock_123(key)) DO UPDATE SET data = upserttest.data || ' with conflict update s2'; <waiting ...>
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
step controller_unlock_1_1: SELECT pg_advisory_unlock(1, 1);
pg_advisory_unlock
------------------
t
(1 row)
t
step controller_unlock_2_1: SELECT pg_advisory_unlock(2, 1);
pg_advisory_unlock
------------------
t
(1 row)
t
step controller_unlock_1_3: SELECT pg_advisory_unlock(1, 3);
pg_advisory_unlock
------------------
t
(1 row)
t
s1: NOTICE: blurt_and_lock_123() called for k1 in session 1
s1: NOTICE: acquiring advisory lock on 2
step controller_unlock_2_3: SELECT pg_advisory_unlock(2, 3);
pg_advisory_unlock
------------------
t
(1 row)
t
s2: NOTICE: blurt_and_lock_123() called for k1 in session 2
s2: NOTICE: acquiring advisory lock on 2
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
step controller_unlock_1_2: SELECT pg_advisory_unlock(1, 2);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1_upsert: <... completed>
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
step controller_unlock_2_2: SELECT pg_advisory_unlock(2, 2);
pg_advisory_unlock
------------------
t
(1 row)
t
s2: NOTICE: blurt_and_lock_123() called for k1 in session 2
s2: NOTICE: acquiring advisory lock on 2
s2: NOTICE: blurt_and_lock_123() called for k1 in session 2
s2: NOTICE: acquiring advisory lock on 2
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
step s1_commit: COMMIT;
s2: NOTICE: blurt_and_lock_123() called for k1 in session 2
s2: NOTICE: acquiring advisory lock on 2
step s2_upsert: <... completed>
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+-----------
k1 |inserted s1
(1 row)
k1 inserted s1
step s2_commit: COMMIT;
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+-----------------------------------
k1 |inserted s1 with conflict update s2
(1 row)
k1 inserted s1 with conflict update s2
starting permutation: s1_create_non_unique_index s1_confirm_index_order controller_locks controller_show s2_begin s1_upsert s2_upsert controller_show controller_unlock_1_1 controller_unlock_2_1 controller_unlock_1_3 controller_unlock_2_3 controller_show controller_lock_2_4 controller_unlock_2_2 controller_show controller_unlock_1_2 controller_print_speculative_locks controller_unlock_2_4 s2_noop controller_print_speculative_locks s2_commit s1_noop controller_show controller_print_speculative_locks
step s1_create_non_unique_index: CREATE INDEX upserttest_key_idx ON upserttest((blurt_and_lock_4(key)));
step s1_confirm_index_order: SELECT 'upserttest_key_uniq_idx'::regclass::int8 < 'upserttest_key_idx'::regclass::int8;
?column?
?column?
--------
t
(1 row)
t
step controller_locks: SELECT pg_advisory_lock(sess, lock), sess, lock FROM generate_series(1, 2) a(sess), generate_series(1,3) b(lock);
pg_advisory_locksess lock
pg_advisory_lock|sess|lock
----------------+----+----
| 1| 1
| 1| 2
| 1| 3
| 2| 1
| 2| 2
| 2| 3
(6 rows)
1 1
1 2
1 3
2 1
2 2
2 3
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
step s2_begin: BEGIN;
s1: NOTICE: blurt_and_lock_123() called for k1 in session 1
@ -310,48 +416,68 @@ s2: NOTICE: blurt_and_lock_123() called for k1 in session 2
s2: NOTICE: acquiring advisory lock on 3
step s2_upsert: INSERT INTO upserttest(key, data) VALUES('k1', 'inserted s2') ON CONFLICT (blurt_and_lock_123(key)) DO UPDATE SET data = upserttest.data || ' with conflict update s2'; <waiting ...>
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
step controller_unlock_1_1: SELECT pg_advisory_unlock(1, 1);
pg_advisory_unlock
------------------
t
(1 row)
t
step controller_unlock_2_1: SELECT pg_advisory_unlock(2, 1);
pg_advisory_unlock
------------------
t
(1 row)
t
step controller_unlock_1_3: SELECT pg_advisory_unlock(1, 3);
pg_advisory_unlock
------------------
t
(1 row)
t
s1: NOTICE: blurt_and_lock_123() called for k1 in session 1
s1: NOTICE: acquiring advisory lock on 2
step controller_unlock_2_3: SELECT pg_advisory_unlock(2, 3);
pg_advisory_unlock
------------------
t
(1 row)
t
s2: NOTICE: blurt_and_lock_123() called for k1 in session 2
s2: NOTICE: acquiring advisory lock on 2
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
step controller_lock_2_4: SELECT pg_advisory_lock(2, 4);
pg_advisory_lock
----------------
(1 row)
step controller_unlock_2_2: SELECT pg_advisory_unlock(2, 2);
pg_advisory_unlock
------------------
t
(1 row)
t
s2: NOTICE: blurt_and_lock_4() called for k1 in session 2
s2: NOTICE: acquiring advisory lock on 4
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+----
(0 rows)
step controller_unlock_1_2: SELECT pg_advisory_unlock(1, 2);
pg_advisory_unlock
------------------
t
(1 row)
t
s1: NOTICE: blurt_and_lock_4() called for k1 in session 1
s1: NOTICE: acquiring advisory lock on 4
s1: NOTICE: blurt_and_lock_123() called for k1 in session 1
@ -367,16 +493,20 @@ step controller_print_speculative_locks:
AND pa.application_name LIKE 'isolation/insert-conflict-specconflict-s%'
ORDER BY 1, 2, 3, 4;
application_namelocktype mode granted
application_name |locktype |mode |granted
-----------------------------------------+-------------+-------------+-------
isolation/insert-conflict-specconflict-s1|spectoken |ShareLock |f
isolation/insert-conflict-specconflict-s1|transactionid|ExclusiveLock|t
isolation/insert-conflict-specconflict-s2|spectoken |ExclusiveLock|t
isolation/insert-conflict-specconflict-s2|transactionid|ExclusiveLock|t
(4 rows)
isolation/insert-conflict-specconflict-s1spectoken ShareLock f
isolation/insert-conflict-specconflict-s1transactionid ExclusiveLock t
isolation/insert-conflict-specconflict-s2spectoken ExclusiveLock t
isolation/insert-conflict-specconflict-s2transactionid ExclusiveLock t
step controller_unlock_2_4: SELECT pg_advisory_unlock(2, 4);
pg_advisory_unlock
------------------
t
(1 row)
t
s1: NOTICE: blurt_and_lock_123() called for k1 in session 1
s1: NOTICE: acquiring advisory lock on 2
step s2_upsert: <... completed>
@ -390,20 +520,24 @@ step controller_print_speculative_locks:
AND pa.application_name LIKE 'isolation/insert-conflict-specconflict-s%'
ORDER BY 1, 2, 3, 4;
application_namelocktype mode granted
application_name |locktype |mode |granted
-----------------------------------------+-------------+-------------+-------
isolation/insert-conflict-specconflict-s1|transactionid|ExclusiveLock|t
isolation/insert-conflict-specconflict-s1|transactionid|ShareLock |f
isolation/insert-conflict-specconflict-s2|transactionid|ExclusiveLock|t
(3 rows)
isolation/insert-conflict-specconflict-s1transactionid ExclusiveLock t
isolation/insert-conflict-specconflict-s1transactionid ShareLock f
isolation/insert-conflict-specconflict-s2transactionid ExclusiveLock t
step s2_commit: COMMIT;
s1: NOTICE: blurt_and_lock_123() called for k1 in session 1
s1: NOTICE: acquiring advisory lock on 2
step s1_upsert: <... completed>
step s1_noop:
step controller_show: SELECT * FROM upserttest;
key data
key|data
---+-----------------------------------
k1 |inserted s2 with conflict update s1
(1 row)
k1 inserted s2 with conflict update s1
step controller_print_speculative_locks:
SELECT pa.application_name, locktype, mode, granted
FROM pg_locks pl JOIN pg_stat_activity pa USING (pid)
@ -413,5 +547,7 @@ step controller_print_speculative_locks:
AND pa.application_name LIKE 'isolation/insert-conflict-specconflict-s%'
ORDER BY 1, 2, 3, 4;
application_namelocktype mode granted
application_name|locktype|mode|granted
----------------+--------+----+-------
(0 rows)

View File

@ -5,492 +5,666 @@ step s1b: BEGIN;
step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s1c: COMMIT;
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: <... completed>
id value
id|value
--+-----
1|one
2|two
(2 rows)
1 one
2 two
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b1 s1l s1u s2l s1c s1ul s2c
step s1b: BEGIN;
step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1c: COMMIT;
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: <... completed>
id value
id|value
--+-----
1|one
2|two
(2 rows)
1 one
2 two
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b1 s1l s1u s1ul s2l s1c s2c
step s1b: BEGIN;
step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1c: COMMIT;
step s2l: <... completed>
id value
id|value
--+-----
1|one
2|two
(2 rows)
1 one
2 two
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b1 s1l s2l s1u s1c s1hint s1ul s2c
step s1b: BEGIN;
step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s1c: COMMIT;
step s1hint: SELECT * FROM lcku_table;
id value
id|value
--+-----
1|one
2|two
(2 rows)
1 one
2 two
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: <... completed>
id value
id|value
--+-----
1|one
2|two
(2 rows)
1 one
2 two
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b1 s1l s1u s2l s1c s1hint s1ul s2c
step s1b: BEGIN;
step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1c: COMMIT;
step s1hint: SELECT * FROM lcku_table;
id value
id|value
--+-----
1|one
2|two
(2 rows)
1 one
2 two
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: <... completed>
id value
id|value
--+-----
1|one
2|two
(2 rows)
1 one
2 two
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b1 s1l s1u s1ul s2l s1c s1hint s2c
step s1b: BEGIN;
step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1c: COMMIT;
step s2l: <... completed>
id value
id|value
--+-----
1|one
2|two
(2 rows)
1 one
2 two
step s1hint: SELECT * FROM lcku_table;
id value
id|value
--+-----
1|one
2|two
(2 rows)
1 one
2 two
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b2 s1l s2l s1u s1c s1ul s2c
step s1b: BEGIN;
step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s1c: COMMIT;
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: <... completed>
ERROR: could not serialize access due to concurrent update
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b2 s1l s1u s2l s1c s1ul s2c
step s1b: BEGIN;
step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1c: COMMIT;
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: <... completed>
ERROR: could not serialize access due to concurrent update
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b2 s1l s1u s1ul s2l s1c s2c
step s1b: BEGIN;
step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1c: COMMIT;
step s2l: <... completed>
ERROR: could not serialize access due to concurrent update
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b2 s1l s2l s1u s1c s1hint s1ul s2c
step s1b: BEGIN;
step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s1c: COMMIT;
step s1hint: SELECT * FROM lcku_table;
id value
id|value
--+-----
1|one
2|two
(2 rows)
1 one
2 two
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: <... completed>
ERROR: could not serialize access due to concurrent update
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b2 s1l s1u s2l s1c s1hint s1ul s2c
step s1b: BEGIN;
step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1c: COMMIT;
step s1hint: SELECT * FROM lcku_table;
id value
id|value
--+-----
1|one
2|two
(2 rows)
1 one
2 two
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: <... completed>
ERROR: could not serialize access due to concurrent update
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b2 s1l s1u s1ul s2l s1c s1hint s2c
step s1b: BEGIN;
step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1c: COMMIT;
step s2l: <... completed>
ERROR: could not serialize access due to concurrent update
step s1hint: SELECT * FROM lcku_table;
id value
id|value
--+-----
1|one
2|two
(2 rows)
1 one
2 two
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b3 s1l s2l s1u s1c s1ul s2c
step s1b: BEGIN;
step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s1c: COMMIT;
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: <... completed>
ERROR: could not serialize access due to concurrent update
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b3 s1l s1u s2l s1c s1ul s2c
step s1b: BEGIN;
step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1c: COMMIT;
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: <... completed>
ERROR: could not serialize access due to concurrent update
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b3 s1l s1u s1ul s2l s1c s2c
step s1b: BEGIN;
step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1c: COMMIT;
step s2l: <... completed>
ERROR: could not serialize access due to concurrent update
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b3 s1l s2l s1u s1c s1hint s1ul s2c
step s1b: BEGIN;
step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s1c: COMMIT;
step s1hint: SELECT * FROM lcku_table;
id value
id|value
--+-----
1|one
2|two
(2 rows)
1 one
2 two
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: <... completed>
ERROR: could not serialize access due to concurrent update
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b3 s1l s1u s2l s1c s1hint s1ul s2c
step s1b: BEGIN;
step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1c: COMMIT;
step s1hint: SELECT * FROM lcku_table;
id value
id|value
--+-----
1|one
2|two
(2 rows)
1 one
2 two
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: <... completed>
ERROR: could not serialize access due to concurrent update
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
starting permutation: s1b s2b3 s1l s1u s1ul s2l s1c s1hint s2c
step s1b: BEGIN;
step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE;
step s1l: SELECT pg_advisory_lock(578902068);
pg_advisory_lock
----------------
(1 row)
step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3;
step s1ul: SELECT pg_advisory_unlock(578902068);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...>
step s1c: COMMIT;
step s2l: <... completed>
ERROR: could not serialize access due to concurrent update
step s1hint: SELECT * FROM lcku_table;
id value
id|value
--+-----
1|one
2|two
(2 rows)
1 one
2 two
step s2c: COMMIT;
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)

File diff suppressed because it is too large Load Diff

View File

@ -2,114 +2,152 @@ Parsed test spec with 2 sessions
starting permutation: s2b s1l s2u s2_blocker1 s2_unlock s2c
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
step s2_blocker1: DELETE FROM foo;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2c: COMMIT;
step s1l: <... completed>
key value
key|value
---+-----
(0 rows)
starting permutation: s2b s1l s2u s2_blocker2 s2_unlock s2c
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
step s2_blocker2: UPDATE foo SET key = 2 WHERE key = 1;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2c: COMMIT;
step s1l: <... completed>
key value
key|value
---+-----
(0 rows)
starting permutation: s2b s1l s2u s2_blocker3 s2_unlock s2c
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
step s2_blocker3: UPDATE foo SET value = 2 WHERE key = 1;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
starting permutation: s2b s1l s2u s2_blocker1 s2_unlock s2r
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
step s2_blocker1: DELETE FROM foo;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2r: ROLLBACK;
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
starting permutation: s2b s1l s2u s2_blocker2 s2_unlock s2r
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
step s2_blocker2: UPDATE foo SET key = 2 WHERE key = 1;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2r: ROLLBACK;
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
starting permutation: s2b s1l s2u s2_blocker3 s2_unlock s2r
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
step s2_blocker3: UPDATE foo SET value = 2 WHERE key = 1;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2r: ROLLBACK;
starting permutation: s2b s1l s2u s2_blocker1 s2c s2_unlock
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
@ -117,16 +155,22 @@ step s2_blocker1: DELETE FROM foo;
step s2c: COMMIT;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1l: <... completed>
key value
key|value
---+-----
(0 rows)
starting permutation: s2b s1l s2u s2_blocker2 s2c s2_unlock
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
@ -134,16 +178,22 @@ step s2_blocker2: UPDATE foo SET key = 2 WHERE key = 1;
step s2c: COMMIT;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1l: <... completed>
key value
key|value
---+-----
(0 rows)
starting permutation: s2b s1l s2u s2_blocker3 s2c s2_unlock
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
@ -151,17 +201,23 @@ step s2_blocker3: UPDATE foo SET value = 2 WHERE key = 1;
step s2c: COMMIT;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
starting permutation: s2b s1l s2u s2_blocker1 s2r s2_unlock
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
@ -169,17 +225,23 @@ step s2_blocker1: DELETE FROM foo;
step s2r: ROLLBACK;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
starting permutation: s2b s1l s2u s2_blocker2 s2r s2_unlock
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
@ -187,17 +249,23 @@ step s2_blocker2: UPDATE foo SET key = 2 WHERE key = 1;
step s2r: ROLLBACK;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
starting permutation: s2b s1l s2u s2_blocker3 s2r s2_unlock
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
@ -205,9 +273,13 @@ step s2_blocker3: UPDATE foo SET value = 2 WHERE key = 1;
step s2r: ROLLBACK;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1

View File

@ -2,112 +2,146 @@ Parsed test spec with 2 sessions
starting permutation: s2b s1l s2u s2_blocker1 s2_unlock s2c
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
step s2_blocker1: DELETE FROM foo;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2c: COMMIT;
step s1l: <... completed>
ERROR: could not serialize access due to concurrent update
starting permutation: s2b s1l s2u s2_blocker2 s2_unlock s2c
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
step s2_blocker2: UPDATE foo SET key = 2 WHERE key = 1;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2c: COMMIT;
step s1l: <... completed>
ERROR: could not serialize access due to concurrent update
starting permutation: s2b s1l s2u s2_blocker3 s2_unlock s2c
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
step s2_blocker3: UPDATE foo SET value = 2 WHERE key = 1;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
starting permutation: s2b s1l s2u s2_blocker1 s2_unlock s2r
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
step s2_blocker1: DELETE FROM foo;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2r: ROLLBACK;
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
starting permutation: s2b s1l s2u s2_blocker2 s2_unlock s2r
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
step s2_blocker2: UPDATE foo SET key = 2 WHERE key = 1;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s2r: ROLLBACK;
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
starting permutation: s2b s1l s2u s2_blocker3 s2_unlock s2r
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
step s2_blocker3: UPDATE foo SET value = 2 WHERE key = 1;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2r: ROLLBACK;
starting permutation: s2b s1l s2u s2_blocker1 s2c s2_unlock
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
@ -115,15 +149,19 @@ step s2_blocker1: DELETE FROM foo;
step s2c: COMMIT;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1l: <... completed>
ERROR: could not serialize access due to concurrent update
starting permutation: s2b s1l s2u s2_blocker2 s2c s2_unlock
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
@ -131,15 +169,19 @@ step s2_blocker2: UPDATE foo SET key = 2 WHERE key = 1;
step s2c: COMMIT;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1l: <... completed>
ERROR: could not serialize access due to concurrent update
starting permutation: s2b s1l s2u s2_blocker3 s2c s2_unlock
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
@ -147,17 +189,23 @@ step s2_blocker3: UPDATE foo SET value = 2 WHERE key = 1;
step s2c: COMMIT;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
starting permutation: s2b s1l s2u s2_blocker1 s2r s2_unlock
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
@ -165,17 +213,23 @@ step s2_blocker1: DELETE FROM foo;
step s2r: ROLLBACK;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
starting permutation: s2b s1l s2u s2_blocker2 s2r s2_unlock
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
@ -183,17 +237,23 @@ step s2_blocker2: UPDATE foo SET key = 2 WHERE key = 1;
step s2r: ROLLBACK;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1
starting permutation: s2b s1l s2u s2_blocker3 s2r s2_unlock
pg_advisory_lock
----------------
(1 row)
step s2b: BEGIN;
step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...>
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
@ -201,9 +261,13 @@ step s2_blocker3: UPDATE foo SET value = 2 WHERE key = 1;
step s2r: ROLLBACK;
step s2_unlock: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1l: <... completed>
key value
key|value
---+-----
1| 1
(1 row)
1 1

View File

@ -4,14 +4,18 @@ starting permutation: s1b s2b s1s s2u s1l s2c s2d1 s1c
step s1b: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s2b: BEGIN;
step s1s: SELECT * FROM foo;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
step s2d1: DELETE FROM foo WHERE key = 1; <waiting ...>
step s1c: COMMIT;
@ -21,14 +25,18 @@ starting permutation: s1b s2b s1s s2u s1l s2c s2d2 s1c
step s1b: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s2b: BEGIN;
step s1s: SELECT * FROM foo;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
step s2d2: UPDATE foo SET key = 3 WHERE key = 1; <waiting ...>
step s1c: COMMIT;
@ -38,14 +46,18 @@ starting permutation: s1b s2b s1s s2u s1l s2c s2d3 s1c
step s1b: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s2b: BEGIN;
step s1s: SELECT * FROM foo;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2u: UPDATE foo SET value = 2 WHERE key = 1;
step s1l: SELECT * FROM foo FOR KEY SHARE;
key value
key|value
---+-----
1| 1
(1 row)
1 1
step s2c: COMMIT;
step s2d3: UPDATE foo SET value = 3 WHERE key = 1;
step s1c: COMMIT;

View File

@ -3,8 +3,10 @@ Parsed test spec with 2 sessions
starting permutation: s2l s1i s2i
step s2l: SELECT pg_advisory_lock(281457);
pg_advisory_lock
----------------
(1 row)
step s1i:
CREATE INDEX CONCURRENTLY mcic_one_pkey ON mcic_one (id)
WHERE lck_shr(281457);
@ -15,6 +17,8 @@ step s2i:
<waiting ...>
step s1i: <... completed>
step s2i: <... completed>
unlck
unlck
-----
t
(1 row)
t

View File

@ -2,21 +2,27 @@ Parsed test spec with 4 sessions
starting permutation: rx1 wx2 c2 wx3 ry3 wy4 rz4 c4 c3 wz1 c1
step rx1: SELECT * FROM t WHERE id = 1000000;
id txt
id|txt
-------+---
1000000|
(1 row)
1000000
step wx2: UPDATE t SET txt = 'b' WHERE id = 1000000;
step c2: COMMIT;
step wx3: UPDATE t SET txt = 'c' WHERE id = 1000000;
step ry3: SELECT * FROM t WHERE id = 500000;
id txt
id|txt
------+---
500000|
(1 row)
500000
step wy4: UPDATE t SET txt = 'd' WHERE id = 500000;
step rz4: SELECT * FROM t WHERE id = 1;
id txt
id|txt
--+---
1|
(1 row)
1
step c4: COMMIT;
step c3: COMMIT;
step wz1: UPDATE t SET txt = 'a' WHERE id = 1;

View File

@ -2,23 +2,31 @@ Parsed test spec with 3 sessions
starting permutation: s1lock s2lock s1svpt s3lock s1lock2 s2c s1c s3c
step s1lock: SELECT * FROM justthis FOR SHARE;
value
value
-----
1
(1 row)
1
step s2lock: SELECT * FROM justthis FOR SHARE;
value
value
-----
1
(1 row)
1
step s1svpt: SAVEPOINT foo;
step s3lock: SELECT * FROM justthis FOR UPDATE; <waiting ...>
step s1lock2: SELECT * FROM justthis FOR SHARE;
value
value
-----
1
(1 row)
1
step s2c: COMMIT;
step s1c: COMMIT;
step s3lock: <... completed>
value
value
-----
1
(1 row)
1
step s3c: COMMIT;

View File

@ -2,129 +2,167 @@ Parsed test spec with 3 sessions
starting permutation: s1_show s1_commit s2_commit
step s1_show: SELECT current_setting('default_transaction_isolation') <> 'read committed';
?column?
?column?
--------
f
(1 row)
f
step s1_commit: COMMIT;
step s2_commit: COMMIT;
starting permutation: s1_lock s2_update s2_abort s3_forkeyshr s1_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s2_abort: ROLLBACK;
step s3_forkeyshr: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s1_commit: COMMIT;
starting permutation: s1_lock s2_update s2_commit s3_forkeyshr s1_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s2_commit: COMMIT;
step s3_forkeyshr: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
2
(1 row)
2
step s1_commit: COMMIT;
starting permutation: s1_lock s2_update s1_commit s3_forkeyshr s2_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s1_commit: COMMIT;
step s3_forkeyshr: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_commit: COMMIT;
starting permutation: s1_lock s2_update s2_abort s3_fornokeyupd s1_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s2_abort: ROLLBACK;
step s3_fornokeyupd: SELECT * FROM dont_forget FOR NO KEY UPDATE;
value
value
-----
1
(1 row)
1
step s1_commit: COMMIT;
starting permutation: s1_lock s2_update s2_commit s3_fornokeyupd s1_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s2_commit: COMMIT;
step s3_fornokeyupd: SELECT * FROM dont_forget FOR NO KEY UPDATE;
value
value
-----
2
(1 row)
2
step s1_commit: COMMIT;
starting permutation: s1_lock s2_update s1_commit s3_fornokeyupd s2_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s1_commit: COMMIT;
step s3_fornokeyupd: SELECT * FROM dont_forget FOR NO KEY UPDATE; <waiting ...>
step s2_commit: COMMIT;
step s3_fornokeyupd: <... completed>
value
value
-----
2
(1 row)
2
starting permutation: s1_lock s2_update s2_abort s3_forupd s1_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s2_abort: ROLLBACK;
step s3_forupd: SELECT * FROM dont_forget FOR UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s3_forupd: <... completed>
value
value
-----
1
(1 row)
1
starting permutation: s1_lock s2_update s2_commit s3_forupd s1_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s2_commit: COMMIT;
step s3_forupd: SELECT * FROM dont_forget FOR UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s3_forupd: <... completed>
value
value
-----
2
(1 row)
2
starting permutation: s1_lock s2_update s1_commit s3_forupd s2_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s1_commit: COMMIT;
step s3_forupd: SELECT * FROM dont_forget FOR UPDATE; <waiting ...>
step s2_commit: COMMIT;
step s3_forupd: <... completed>
value
value
-----
2
(1 row)
2

View File

@ -2,82 +2,106 @@ Parsed test spec with 3 sessions
starting permutation: s1_show s1_commit s2_commit
step s1_show: SELECT current_setting('default_transaction_isolation') <> 'read committed';
?column?
?column?
--------
t
(1 row)
t
step s1_commit: COMMIT;
step s2_commit: COMMIT;
starting permutation: s1_lock s2_update s2_abort s3_forkeyshr s1_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s2_abort: ROLLBACK;
step s3_forkeyshr: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s1_commit: COMMIT;
starting permutation: s1_lock s2_update s2_commit s3_forkeyshr s1_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s2_commit: COMMIT;
step s3_forkeyshr: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
2
(1 row)
2
step s1_commit: COMMIT;
starting permutation: s1_lock s2_update s1_commit s3_forkeyshr s2_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s1_commit: COMMIT;
step s3_forkeyshr: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_commit: COMMIT;
starting permutation: s1_lock s2_update s2_abort s3_fornokeyupd s1_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s2_abort: ROLLBACK;
step s3_fornokeyupd: SELECT * FROM dont_forget FOR NO KEY UPDATE;
value
value
-----
1
(1 row)
1
step s1_commit: COMMIT;
starting permutation: s1_lock s2_update s2_commit s3_fornokeyupd s1_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s2_commit: COMMIT;
step s3_fornokeyupd: SELECT * FROM dont_forget FOR NO KEY UPDATE;
value
value
-----
2
(1 row)
2
step s1_commit: COMMIT;
starting permutation: s1_lock s2_update s1_commit s3_fornokeyupd s2_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s1_commit: COMMIT;
step s3_fornokeyupd: SELECT * FROM dont_forget FOR NO KEY UPDATE; <waiting ...>
@ -87,37 +111,47 @@ ERROR: could not serialize access due to concurrent update
starting permutation: s1_lock s2_update s2_abort s3_forupd s1_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s2_abort: ROLLBACK;
step s3_forupd: SELECT * FROM dont_forget FOR UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s3_forupd: <... completed>
value
value
-----
1
(1 row)
1
starting permutation: s1_lock s2_update s2_commit s3_forupd s1_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s2_commit: COMMIT;
step s3_forupd: SELECT * FROM dont_forget FOR UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s3_forupd: <... completed>
value
value
-----
2
(1 row)
2
starting permutation: s1_lock s2_update s1_commit s3_forupd s2_commit
step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE;
value
value
-----
1
(1 row)
1
step s2_update: UPDATE dont_forget SET value = 2;
step s1_commit: COMMIT;
step s3_forupd: SELECT * FROM dont_forget FOR UPDATE; <waiting ...>

View File

@ -2,13 +2,17 @@ Parsed test spec with 2 sessions
starting permutation: s1a s2a s2b s1b s2c
step s1a: SELECT * FROM foo FOR SHARE NOWAIT;
id data
id|data
--+----
1|x
(1 row)
1 x
step s2a: SELECT * FROM foo FOR SHARE NOWAIT;
id data
id|data
--+----
1|x
(1 row)
1 x
step s2b: SELECT * FROM foo FOR UPDATE NOWAIT;
ERROR: could not obtain lock on row in relation "foo"
step s1b: COMMIT;
@ -16,13 +20,17 @@ step s2c: COMMIT;
starting permutation: s2a s1a s2b s1b s2c
step s2a: SELECT * FROM foo FOR SHARE NOWAIT;
id data
id|data
--+----
1|x
(1 row)
1 x
step s1a: SELECT * FROM foo FOR SHARE NOWAIT;
id data
id|data
--+----
1|x
(1 row)
1 x
step s2b: SELECT * FROM foo FOR UPDATE NOWAIT;
ERROR: could not obtain lock on row in relation "foo"
step s1b: COMMIT;
@ -30,13 +38,17 @@ step s2c: COMMIT;
starting permutation: s2a s2b s1a s1b s2c
step s2a: SELECT * FROM foo FOR SHARE NOWAIT;
id data
id|data
--+----
1|x
(1 row)
1 x
step s2b: SELECT * FROM foo FOR UPDATE NOWAIT;
id data
id|data
--+----
1|x
(1 row)
1 x
step s1a: SELECT * FROM foo FOR SHARE NOWAIT;
ERROR: could not obtain lock on row in relation "foo"
step s1b: COMMIT;

View File

@ -2,16 +2,20 @@ Parsed test spec with 3 sessions
starting permutation: s1a s2a s3a s1b s2b s3b
step s1a: SELECT * FROM foo FOR UPDATE;
id data
id|data
--+----
1|x
(1 row)
1 x
step s2a: SELECT * FROM foo FOR UPDATE; <waiting ...>
step s3a: SELECT * FROM foo FOR UPDATE NOWAIT;
ERROR: could not obtain lock on row in relation "foo"
step s1b: COMMIT;
step s2a: <... completed>
id data
id|data
--+----
1|x
(1 row)
1 x
step s2b: COMMIT;
step s3b: COMMIT;

View File

@ -3,16 +3,20 @@ Parsed test spec with 2 sessions
starting permutation: s2a s1a s2b s2c s2d s2e s1b s2f
step s2a: SELECT pg_advisory_lock(0);
pg_advisory_lock
----------------
(1 row)
step s1a: SELECT * FROM foo WHERE pg_advisory_lock(0) IS NOT NULL FOR UPDATE NOWAIT; <waiting ...>
step s2b: UPDATE foo SET data = data;
step s2c: BEGIN;
step s2d: UPDATE foo SET data = data;
step s2e: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1a: <... completed>
ERROR: could not obtain lock on row in relation "foo"
step s1b: COMMIT;

View File

@ -3,16 +3,20 @@ Parsed test spec with 2 sessions
starting permutation: s2a s1a s2b s2c s2d s2e s1b s2f
step s2a: SELECT pg_advisory_lock(0);
pg_advisory_lock
----------------
(1 row)
step s1a: SELECT * FROM foo WHERE pg_advisory_lock(0) IS NOT NULL FOR UPDATE NOWAIT; <waiting ...>
step s2b: UPDATE foo SET data = data;
step s2c: BEGIN;
step s2d: UPDATE foo SET data = data;
step s2e: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1a: <... completed>
ERROR: could not serialize access due to concurrent update
step s1b: COMMIT;

View File

@ -8,8 +8,10 @@ step upd_getlock:
SELECT pg_advisory_lock(0);
pg_advisory_lock
----------------
(1 row)
step sl1_exec:
BEGIN ISOLATION LEVEL READ COMMITTED;
EXECUTE sl1_run;
@ -24,14 +26,18 @@ step lk1_doforshare:
BEGIN ISOLATION LEVEL READ COMMITTED;
SELECT id FROM test_nowait WHERE id % 2 = 0 FOR SHARE;
id
id
--
2
(1 row)
2
step upd_releaselock:
SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step sl1_exec: <... completed>
ERROR: could not obtain lock on row in relation "test_nowait"

View File

@ -2,21 +2,27 @@ Parsed test spec with 2 sessions
starting permutation: s1a s1b s2a s2b
step s1a: SELECT * FROM foo FOR UPDATE NOWAIT;
id data
id|data
--+----
1|x
(1 row)
1 x
step s1b: COMMIT;
step s2a: SELECT * FROM foo FOR UPDATE NOWAIT;
id data
id|data
--+----
1|x
(1 row)
1 x
step s2b: COMMIT;
starting permutation: s1a s2a s1b s2b
step s1a: SELECT * FROM foo FOR UPDATE NOWAIT;
id data
id|data
--+----
1|x
(1 row)
1 x
step s2a: SELECT * FROM foo FOR UPDATE NOWAIT;
ERROR: could not obtain lock on row in relation "foo"
step s1b: COMMIT;
@ -24,9 +30,11 @@ step s2b: COMMIT;
starting permutation: s1a s2a s2b s1b
step s1a: SELECT * FROM foo FOR UPDATE NOWAIT;
id data
id|data
--+----
1|x
(1 row)
1 x
step s2a: SELECT * FROM foo FOR UPDATE NOWAIT;
ERROR: could not obtain lock on row in relation "foo"
step s2b: COMMIT;
@ -34,9 +42,11 @@ step s1b: COMMIT;
starting permutation: s2a s1a s1b s2b
step s2a: SELECT * FROM foo FOR UPDATE NOWAIT;
id data
id|data
--+----
1|x
(1 row)
1 x
step s1a: SELECT * FROM foo FOR UPDATE NOWAIT;
ERROR: could not obtain lock on row in relation "foo"
step s1b: COMMIT;
@ -44,9 +54,11 @@ step s2b: COMMIT;
starting permutation: s2a s1a s2b s1b
step s2a: SELECT * FROM foo FOR UPDATE NOWAIT;
id data
id|data
--+----
1|x
(1 row)
1 x
step s1a: SELECT * FROM foo FOR UPDATE NOWAIT;
ERROR: could not obtain lock on row in relation "foo"
step s2b: COMMIT;
@ -54,12 +66,16 @@ step s1b: COMMIT;
starting permutation: s2a s2b s1a s1b
step s2a: SELECT * FROM foo FOR UPDATE NOWAIT;
id data
id|data
--+----
1|x
(1 row)
1 x
step s2b: COMMIT;
step s1a: SELECT * FROM foo FOR UPDATE NOWAIT;
id data
id|data
--+----
1|x
(1 row)
1 x
step s1b: COMMIT;

File diff suppressed because it is too large Load Diff

View File

@ -10,11 +10,13 @@ step s2i: <... completed>
ERROR: new row for relation "tpart_default" violates partition constraint
step s2c: commit;
step s2s: select tableoid::regclass, * from tpart;
tableoid i j
tableoid| i|j
--------+---+---
tpart_2 |110|xxx
tpart_2 |120|yyy
tpart_2 |150|zzz
(3 rows)
tpart_2 110 xxx
tpart_2 120 yyy
tpart_2 150 zzz
starting permutation: s1b s1a s2b s2i2 s1c s2c s2s
step s1b: begin;
@ -26,11 +28,13 @@ step s2i2: <... completed>
ERROR: new row for relation "tpart_default" violates partition constraint
step s2c: commit;
step s2s: select tableoid::regclass, * from tpart;
tableoid i j
tableoid| i|j
--------+---+---
tpart_2 |110|xxx
tpart_2 |120|yyy
tpart_2 |150|zzz
(3 rows)
tpart_2 110 xxx
tpart_2 120 yyy
tpart_2 150 zzz
starting permutation: s1b s2b s2i s1a s2c s1c s2s
step s1b: begin;
@ -42,8 +46,10 @@ step s1a: <... completed>
ERROR: updated partition constraint for default partition "tpart_default_default" would be violated by some row
step s1c: commit;
step s2s: select tableoid::regclass, * from tpart;
tableoid i j
tableoid | i|j
---------------------+---+---
tpart_default_default|110|xxx
tpart_default_default|120|yyy
tpart_default_default|150|zzz
(3 rows)
tpart_default_default110 xxx
tpart_default_default120 yyy
tpart_default_default150 zzz

View File

@ -9,10 +9,12 @@ step s2donothing: <... completed>
step s3donothing: <... completed>
step s2c: COMMIT;
step s3select: SELECT * FROM foo ORDER BY a;
a b
a|b
-+-----------------------------------
1|session-2 donothing
2|initial tuple -> moved by session-1
(2 rows)
1 session-2 donothing
2 initial tuple -> moved by session-1
step s3c: COMMIT;
starting permutation: s2donothing s1u s3donothing s1c s2c s3select s3c
@ -23,7 +25,9 @@ step s1c: COMMIT;
step s3donothing: <... completed>
step s2c: COMMIT;
step s3select: SELECT * FROM foo ORDER BY a;
a b
a|b
-+-----------------------------------
2|initial tuple -> moved by session-1
(1 row)
2 initial tuple -> moved by session-1
step s3c: COMMIT;

View File

@ -11,10 +11,12 @@ step s2c: COMMIT;
step s3donothing: INSERT INTO foo VALUES(2, 'session-3 donothing'), (2, 'session-3 donothing2') ON CONFLICT DO NOTHING;
step s3c: COMMIT;
step s2select: SELECT * FROM foo ORDER BY a;
a b
a|b
-+-----------------------------------
1|session-2 donothing
2|initial tuple -> moved by session-1
(2 rows)
1 session-2 donothing
2 initial tuple -> moved by session-1
starting permutation: s2beginrr s3beginrr s1u s3donothing s1c s3c s2donothing s2c s2select
step s2beginrr: BEGIN ISOLATION LEVEL REPEATABLE READ;
@ -28,10 +30,12 @@ step s3c: COMMIT;
step s2donothing: INSERT INTO foo VALUES(1, 'session-2 donothing') ON CONFLICT DO NOTHING;
step s2c: COMMIT;
step s2select: SELECT * FROM foo ORDER BY a;
a b
a|b
-+-----------------------------------
1|session-2 donothing
2|initial tuple -> moved by session-1
(2 rows)
1 session-2 donothing
2 initial tuple -> moved by session-1
starting permutation: s2beginrr s3beginrr s1u s2donothing s3donothing s1c s2c s3c s2select
step s2beginrr: BEGIN ISOLATION LEVEL REPEATABLE READ;
@ -46,10 +50,12 @@ ERROR: could not serialize access due to concurrent update
step s2c: COMMIT;
step s3c: COMMIT;
step s2select: SELECT * FROM foo ORDER BY a;
a b
a|b
-+-----------------------------------
1|session-2 donothing
2|initial tuple -> moved by session-1
(2 rows)
1 session-2 donothing
2 initial tuple -> moved by session-1
starting permutation: s2beginrr s3beginrr s1u s3donothing s2donothing s1c s3c s2c s2select
step s2beginrr: BEGIN ISOLATION LEVEL REPEATABLE READ;
@ -64,10 +70,12 @@ step s2donothing: <... completed>
step s3c: COMMIT;
step s2c: COMMIT;
step s2select: SELECT * FROM foo ORDER BY a;
a b
a|b
-+-----------------------------------
1|session-2 donothing
2|initial tuple -> moved by session-1
(2 rows)
1 session-2 donothing
2 initial tuple -> moved by session-1
starting permutation: s2begins s3begins s1u s2donothing s1c s2c s3donothing s3c s2select
step s2begins: BEGIN ISOLATION LEVEL SERIALIZABLE;
@ -80,10 +88,12 @@ step s2c: COMMIT;
step s3donothing: INSERT INTO foo VALUES(2, 'session-3 donothing'), (2, 'session-3 donothing2') ON CONFLICT DO NOTHING;
step s3c: COMMIT;
step s2select: SELECT * FROM foo ORDER BY a;
a b
a|b
-+-----------------------------------
1|session-2 donothing
2|initial tuple -> moved by session-1
(2 rows)
1 session-2 donothing
2 initial tuple -> moved by session-1
starting permutation: s2begins s3begins s1u s3donothing s1c s3c s2donothing s2c s2select
step s2begins: BEGIN ISOLATION LEVEL SERIALIZABLE;
@ -97,10 +107,12 @@ step s3c: COMMIT;
step s2donothing: INSERT INTO foo VALUES(1, 'session-2 donothing') ON CONFLICT DO NOTHING;
step s2c: COMMIT;
step s2select: SELECT * FROM foo ORDER BY a;
a b
a|b
-+-----------------------------------
1|session-2 donothing
2|initial tuple -> moved by session-1
(2 rows)
1 session-2 donothing
2 initial tuple -> moved by session-1
starting permutation: s2begins s3begins s1u s2donothing s3donothing s1c s2c s3c s2select
step s2begins: BEGIN ISOLATION LEVEL SERIALIZABLE;
@ -115,10 +127,12 @@ ERROR: could not serialize access due to concurrent update
step s2c: COMMIT;
step s3c: COMMIT;
step s2select: SELECT * FROM foo ORDER BY a;
a b
a|b
-+-----------------------------------
1|session-2 donothing
2|initial tuple -> moved by session-1
(2 rows)
1 session-2 donothing
2 initial tuple -> moved by session-1
starting permutation: s2begins s3begins s1u s3donothing s2donothing s1c s3c s2c s2select
step s2begins: BEGIN ISOLATION LEVEL SERIALIZABLE;
@ -133,7 +147,9 @@ step s2donothing: <... completed>
step s3c: COMMIT;
step s2c: COMMIT;
step s2select: SELECT * FROM foo ORDER BY a;
a b
a|b
-+-----------------------------------
1|session-2 donothing
2|initial tuple -> moved by session-1
(2 rows)
1 session-2 donothing
2 initial tuple -> moved by session-1

View File

@ -9,9 +9,11 @@ step s2c: COMMIT;
step s1u: <... completed>
step s1c: COMMIT;
step s1s: SELECT tableoid::regclass, * FROM foo ORDER BY a;
tableoid a b
tableoid|a|b
--------+-+-------------------
foo2 |2|ABC update2 update1
(1 row)
foo2 2 ABC update2 update1
starting permutation: s1b s2b s2ut1 s1ut s2c s1c s1st s1stl
step s1b: BEGIN ISOLATION LEVEL READ COMMITTED;
@ -22,13 +24,17 @@ step s2c: COMMIT;
step s1ut: <... completed>
step s1c: COMMIT;
step s1st: SELECT tableoid::regclass, * FROM footrg ORDER BY a;
tableoid a b
tableoid|a|b
--------+-+-------------------
footrg2 |2|ABC update2 update1
(1 row)
footrg2 2 ABC update2 update1
step s1stl: SELECT * FROM triglog ORDER BY a;
a b
a|b
-+-------------------
1|ABC update2 trigger
(1 row)
1 ABC update2 trigger
starting permutation: s1b s2b s2u2 s1u s2c s1c s1s
step s1b: BEGIN ISOLATION LEVEL READ COMMITTED;
@ -39,9 +45,11 @@ step s2c: COMMIT;
step s1u: <... completed>
step s1c: COMMIT;
step s1s: SELECT tableoid::regclass, * FROM foo ORDER BY a;
tableoid a b
tableoid|a|b
--------+-+---
foo1 |1|EFG
(1 row)
foo1 1 EFG
starting permutation: s1b s2b s2ut2 s1ut s2c s1c s1st s1stl
step s1b: BEGIN ISOLATION LEVEL READ COMMITTED;
@ -52,9 +60,13 @@ step s2c: COMMIT;
step s1ut: <... completed>
step s1c: COMMIT;
step s1st: SELECT tableoid::regclass, * FROM footrg ORDER BY a;
tableoid a b
tableoid|a|b
--------+-+---
footrg1 |1|EFG
(1 row)
footrg1 1 EFG
step s1stl: SELECT * FROM triglog ORDER BY a;
a b
a|b
-+-
(0 rows)

View File

@ -2,17 +2,23 @@ Parsed test spec with 2 sessions
starting permutation: lock assign1 vacuum unlock
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
step lock:
SELECT pg_advisory_lock(1);
pg_advisory_lock
----------------
(1 row)
step assign1:
do $$
declare
@ -33,24 +39,32 @@ step unlock:
SELECT pg_advisory_unlock(1);
pg_advisory_unlock
------------------
t
(1 row)
t
s1: NOTICE: length(x) = 6000
step assign1: <... completed>
starting permutation: lock assign2 vacuum unlock
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
step lock:
SELECT pg_advisory_lock(1);
pg_advisory_lock
----------------
(1 row)
step assign2:
do $$
declare
@ -71,24 +85,32 @@ step unlock:
SELECT pg_advisory_unlock(1);
pg_advisory_unlock
------------------
t
(1 row)
t
s1: NOTICE: length(x) = 6000
step assign2: <... completed>
starting permutation: lock assign3 vacuum unlock
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
step lock:
SELECT pg_advisory_lock(1);
pg_advisory_lock
----------------
(1 row)
step assign3:
do $$
declare
@ -110,24 +132,32 @@ step unlock:
SELECT pg_advisory_unlock(1);
pg_advisory_unlock
------------------
t
(1 row)
t
s1: NOTICE: length(r) = 6004
step assign3: <... completed>
starting permutation: lock assign4 vacuum unlock
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
step lock:
SELECT pg_advisory_lock(1);
pg_advisory_lock
----------------
(1 row)
step assign4:
do $$
declare
@ -148,24 +178,32 @@ step unlock:
SELECT pg_advisory_unlock(1);
pg_advisory_unlock
------------------
t
(1 row)
t
s1: NOTICE: length(r) = 6004
step assign4: <... completed>
starting permutation: lock assign5 vacuum unlock
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
step lock:
SELECT pg_advisory_lock(1);
pg_advisory_lock
----------------
(1 row)
step assign5:
do $$
declare
@ -188,24 +226,32 @@ step unlock:
SELECT pg_advisory_unlock(1);
pg_advisory_unlock
------------------
t
(1 row)
t
s1: NOTICE: length(r) = 6002
step assign5: <... completed>
starting permutation: lock assign6 vacuum unlock
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
step lock:
SELECT pg_advisory_lock(1);
pg_advisory_lock
----------------
(1 row)
step assign6:
do $$
declare
@ -229,8 +275,10 @@ step unlock:
SELECT pg_advisory_unlock(1);
pg_advisory_unlock
------------------
t
(1 row)
t
s1: NOTICE: length(r) = 6002
s1: NOTICE: length(r) = 9002
s1: NOTICE: length(r) = 12002
@ -238,11 +286,15 @@ step assign6: <... completed>
starting permutation: fetch-after-commit
pg_advisory_unlock_all
----------------------
(1 row)
pg_advisory_unlock_all
----------------------
(1 row)
s1: NOTICE: length(t) = 6000
s1: NOTICE: length(t) = 9000
s1: NOTICE: length(t) = 12000

View File

@ -2,13 +2,17 @@ Parsed test spec with 3 sessions
starting permutation: ra1 ro2 wo1 c1 wa2 c2
step ra1: select * from gin_tbl where p @> array[1] limit 1;
p
p
---
{1}
(1 row)
{1}
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wo1: insert into other_tbl values (1);
step c1: commit;
step wa2: insert into gin_tbl values (array[1]);
@ -17,13 +21,17 @@ step c2: commit;
starting permutation: ro2 ra1 wo1 c1 wa2 c2
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step ra1: select * from gin_tbl where p @> array[1] limit 1;
p
p
---
{1}
(1 row)
{1}
step wo1: insert into other_tbl values (1);
step c1: commit;
step wa2: insert into gin_tbl values (array[1]);
@ -32,13 +40,17 @@ step c2: commit;
starting permutation: ro2 ra1 wo1 wa2 c1 c2
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step ra1: select * from gin_tbl where p @> array[1] limit 1;
p
p
---
{1}
(1 row)
{1}
step wo1: insert into other_tbl values (1);
step wa2: insert into gin_tbl values (array[1]);
step c1: commit;
@ -47,13 +59,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ra1 ro2 wa2 wo1 c1 c2
step ra1: select * from gin_tbl where p @> array[1] limit 1;
p
p
---
{1}
(1 row)
{1}
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wa2: insert into gin_tbl values (array[1]);
step wo1: insert into other_tbl values (1);
step c1: commit;
@ -62,13 +78,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rb1 ro2 wo1 c1 wb2 c2
step rb1: select count(*) from gin_tbl where p @> array[2];
count
count
-----
1
(1 row)
1
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wo1: insert into other_tbl values (1);
step c1: commit;
step wb2: insert into gin_tbl values (array[2]);
@ -77,13 +97,17 @@ step c2: commit;
starting permutation: ro2 rb1 wo1 c1 wb2 c2
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step rb1: select count(*) from gin_tbl where p @> array[2];
count
count
-----
1
(1 row)
1
step wo1: insert into other_tbl values (1);
step c1: commit;
step wb2: insert into gin_tbl values (array[2]);
@ -92,13 +116,17 @@ step c2: commit;
starting permutation: ro2 rb1 wo1 wb2 c1 c2
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step rb1: select count(*) from gin_tbl where p @> array[2];
count
count
-----
1
(1 row)
1
step wo1: insert into other_tbl values (1);
step wb2: insert into gin_tbl values (array[2]);
step c1: commit;
@ -107,13 +135,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rb1 ro2 wb2 wo1 c1 c2
step rb1: select count(*) from gin_tbl where p @> array[2];
count
count
-----
1
(1 row)
1
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wb2: insert into gin_tbl values (array[2]);
step wo1: insert into other_tbl values (1);
step c1: commit;
@ -122,13 +154,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rc1 ro2 wo1 c1 wc2 c2
step rc1: select count(*) from gin_tbl where p @> array[800];
count
count
-----
1
(1 row)
1
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wo1: insert into other_tbl values (1);
step c1: commit;
step wc2: insert into gin_tbl values (array[800]);
@ -137,13 +173,17 @@ step c2: commit;
starting permutation: ro2 rc1 wo1 c1 wc2 c2
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step rc1: select count(*) from gin_tbl where p @> array[800];
count
count
-----
1
(1 row)
1
step wo1: insert into other_tbl values (1);
step c1: commit;
step wc2: insert into gin_tbl values (array[800]);
@ -152,13 +192,17 @@ step c2: commit;
starting permutation: ro2 rc1 wo1 wc2 c1 c2
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step rc1: select count(*) from gin_tbl where p @> array[800];
count
count
-----
1
(1 row)
1
step wo1: insert into other_tbl values (1);
step wc2: insert into gin_tbl values (array[800]);
step c1: commit;
@ -167,13 +211,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rc1 ro2 wc2 wo1 c1 c2
step rc1: select count(*) from gin_tbl where p @> array[800];
count
count
-----
1
(1 row)
1
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wc2: insert into gin_tbl values (array[800]);
step wo1: insert into other_tbl values (1);
step c1: commit;
@ -182,13 +230,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ra1 ro2 wo1 c1 wb2 c2
step ra1: select * from gin_tbl where p @> array[1] limit 1;
p
p
---
{1}
(1 row)
{1}
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wo1: insert into other_tbl values (1);
step c1: commit;
step wb2: insert into gin_tbl values (array[2]);
@ -196,13 +248,17 @@ step c2: commit;
starting permutation: ro2 ra1 wo1 c1 wc2 c2
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step ra1: select * from gin_tbl where p @> array[1] limit 1;
p
p
---
{1}
(1 row)
{1}
step wo1: insert into other_tbl values (1);
step c1: commit;
step wc2: insert into gin_tbl values (array[800]);
@ -210,13 +266,17 @@ step c2: commit;
starting permutation: ro2 rb1 wo1 wa2 c1 c2
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step rb1: select count(*) from gin_tbl where p @> array[2];
count
count
-----
1
(1 row)
1
step wo1: insert into other_tbl values (1);
step wa2: insert into gin_tbl values (array[1]);
step c1: commit;
@ -224,13 +284,17 @@ step c2: commit;
starting permutation: rc1 ro2 wa2 wo1 c1 c2
step rc1: select count(*) from gin_tbl where p @> array[800];
count
count
-----
1
(1 row)
1
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wa2: insert into gin_tbl values (array[1]);
step wo1: insert into other_tbl values (1);
step c1: commit;
@ -238,13 +302,17 @@ step c2: commit;
starting permutation: rb1 ro2 wo1 c1 wa2 c2
step rb1: select count(*) from gin_tbl where p @> array[2];
count
count
-----
1
(1 row)
1
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wo1: insert into other_tbl values (1);
step c1: commit;
step wa2: insert into gin_tbl values (array[1]);
@ -252,13 +320,17 @@ step c2: commit;
starting permutation: ro2 rb1 wo1 c1 wc2 c2
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step rb1: select count(*) from gin_tbl where p @> array[2];
count
count
-----
1
(1 row)
1
step wo1: insert into other_tbl values (1);
step c1: commit;
step wc2: insert into gin_tbl values (array[800]);
@ -266,13 +338,17 @@ step c2: commit;
starting permutation: ro2 ra1 wo1 wb2 c1 c2
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step ra1: select * from gin_tbl where p @> array[1] limit 1;
p
p
---
{1}
(1 row)
{1}
step wo1: insert into other_tbl values (1);
step wb2: insert into gin_tbl values (array[2]);
step c1: commit;
@ -280,13 +356,17 @@ step c2: commit;
starting permutation: rc1 ro2 wb2 wo1 c1 c2
step rc1: select count(*) from gin_tbl where p @> array[800];
count
count
-----
1
(1 row)
1
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wb2: insert into gin_tbl values (array[2]);
step wo1: insert into other_tbl values (1);
step c1: commit;
@ -294,13 +374,17 @@ step c2: commit;
starting permutation: rc1 ro2 wo1 c1 wa2 c2
step rc1: select count(*) from gin_tbl where p @> array[800];
count
count
-----
1
(1 row)
1
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wo1: insert into other_tbl values (1);
step c1: commit;
step wa2: insert into gin_tbl values (array[1]);
@ -308,13 +392,17 @@ step c2: commit;
starting permutation: ro2 rc1 wo1 c1 wb2 c2
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step rc1: select count(*) from gin_tbl where p @> array[800];
count
count
-----
1
(1 row)
1
step wo1: insert into other_tbl values (1);
step c1: commit;
step wb2: insert into gin_tbl values (array[2]);
@ -322,13 +410,17 @@ step c2: commit;
starting permutation: ro2 ra1 wo1 wc2 c1 c2
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step ra1: select * from gin_tbl where p @> array[1] limit 1;
p
p
---
{1}
(1 row)
{1}
step wo1: insert into other_tbl values (1);
step wc2: insert into gin_tbl values (array[800]);
step c1: commit;
@ -336,13 +428,17 @@ step c2: commit;
starting permutation: rb1 ro2 wc2 wo1 c1 c2
step rb1: select count(*) from gin_tbl where p @> array[2];
count
count
-----
1
(1 row)
1
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wc2: insert into gin_tbl values (array[800]);
step wo1: insert into other_tbl values (1);
step c1: commit;
@ -351,13 +447,17 @@ step c2: commit;
starting permutation: fu ra1 ro2 wo1 c1 wa2 c2
step fu: alter index ginidx set (fastupdate = on);
step ra1: select * from gin_tbl where p @> array[1] limit 1;
p
p
---
{1}
(1 row)
{1}
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wo1: insert into other_tbl values (1);
step c1: commit;
step wa2: insert into gin_tbl values (array[1]);
@ -367,13 +467,17 @@ step c2: commit;
starting permutation: fu ra1 ro2 wo1 c1 wb2 c2
step fu: alter index ginidx set (fastupdate = on);
step ra1: select * from gin_tbl where p @> array[1] limit 1;
p
p
---
{1}
(1 row)
{1}
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wo1: insert into other_tbl values (1);
step c1: commit;
step wb2: insert into gin_tbl values (array[2]);
@ -382,13 +486,17 @@ step c2: commit;
starting permutation: ra1 ro2 wo1 c1 fu wa2 c2
step ra1: select * from gin_tbl where p @> array[1] limit 1;
p
p
---
{1}
(1 row)
{1}
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wo1: insert into other_tbl values (1);
step c1: commit;
step fu: alter index ginidx set (fastupdate = on);
@ -398,13 +506,17 @@ step c2: commit;
starting permutation: rd1 ro2 wo1 c1 wd2 c2
step rd1: select count(*) from gin_tbl where p @> array[2000];
count
count
-----
0
(1 row)
0
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wo1: insert into other_tbl values (1);
step c1: commit;
step wd2: insert into gin_tbl values (array[2000]);
@ -413,13 +525,17 @@ step c2: commit;
starting permutation: ro2 rd1 wo1 c1 wd2 c2
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step rd1: select count(*) from gin_tbl where p @> array[2000];
count
count
-----
0
(1 row)
0
step wo1: insert into other_tbl values (1);
step c1: commit;
step wd2: insert into gin_tbl values (array[2000]);
@ -428,13 +544,17 @@ step c2: commit;
starting permutation: ro2 rd1 wo1 wd2 c1 c2
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step rd1: select count(*) from gin_tbl where p @> array[2000];
count
count
-----
0
(1 row)
0
step wo1: insert into other_tbl values (1);
step wd2: insert into gin_tbl values (array[2000]);
step c1: commit;
@ -443,13 +563,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rd1 ro2 wd2 wo1 c1 c2
step rd1: select count(*) from gin_tbl where p @> array[2000];
count
count
-----
0
(1 row)
0
step ro2: select count(*) from other_tbl;
count
count
-----
0
(1 row)
0
step wd2: insert into gin_tbl values (array[2000]);
step wo1: insert into other_tbl values (1);
step c1: commit;

View File

@ -2,79 +2,99 @@ Parsed test spec with 2 sessions
starting permutation: rxy1 wx1 c1 rxy2 wy2 c2
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step wx1: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(15, 20) g;
step c1: commit;
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2233750
(1 row)
2233750
step wy2: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(1, 5) g;
step c2: commit;
starting permutation: rxy2 wy2 c2 rxy1 wx1 c1
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step wy2: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(1, 5) g;
step c2: commit;
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
316250
(1 row)
316250
step wx1: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(15, 20) g;
step c1: commit;
starting permutation: rxy3 wx3 c1 rxy4 wy4 c2
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step wx3: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(12, 18) g;
step c1: commit;
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step wy4: insert into gist_point_tbl (id, p)
select g, point(g*50, g*50) from generate_series(1, 20) g;
step c2: commit;
starting permutation: rxy4 wy4 c2 rxy3 wx3 c1
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step wy4: insert into gist_point_tbl (id, p)
select g, point(g*50, g*50) from generate_series(1, 20) g;
step c2: commit;
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step wx3: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(12, 18) g;
step c1: commit;
starting permutation: rxy1 wx1 rxy2 c1 wy2 c2
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step wx1: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(15, 20) g;
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step c1: commit;
step wy2: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(1, 5) g;
@ -83,15 +103,19 @@ step c2: commit;
starting permutation: rxy1 wx1 rxy2 wy2 c1 c2
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step wx1: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(15, 20) g;
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step wy2: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(1, 5) g;
step c1: commit;
@ -100,15 +124,19 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy1 wx1 rxy2 wy2 c2 c1
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step wx1: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(15, 20) g;
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step wy2: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(1, 5) g;
step c2: commit;
@ -117,13 +145,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy1 rxy2 wx1 c1 wy2 c2
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step wx1: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(15, 20) g;
step c1: commit;
@ -134,13 +166,17 @@ step c2: commit;
starting permutation: rxy1 rxy2 wx1 wy2 c1 c2
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step wx1: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(15, 20) g;
step wy2: insert into gist_point_tbl (id, p)
@ -151,13 +187,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy1 rxy2 wx1 wy2 c2 c1
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step wx1: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(15, 20) g;
step wy2: insert into gist_point_tbl (id, p)
@ -168,13 +208,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy1 rxy2 wy2 wx1 c1 c2
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step wy2: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(1, 5) g;
step wx1: insert into gist_point_tbl (id, p)
@ -185,13 +229,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy1 rxy2 wy2 wx1 c2 c1
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step wy2: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(1, 5) g;
step wx1: insert into gist_point_tbl (id, p)
@ -202,13 +250,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy1 rxy2 wy2 c2 wx1 c1
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step wy2: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(1, 5) g;
step c2: commit;
@ -219,13 +271,17 @@ step c1: commit;
starting permutation: rxy2 rxy1 wx1 c1 wy2 c2
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step wx1: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(15, 20) g;
step c1: commit;
@ -236,13 +292,17 @@ step c2: commit;
starting permutation: rxy2 rxy1 wx1 wy2 c1 c2
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step wx1: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(15, 20) g;
step wy2: insert into gist_point_tbl (id, p)
@ -253,13 +313,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy2 rxy1 wx1 wy2 c2 c1
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step wx1: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(15, 20) g;
step wy2: insert into gist_point_tbl (id, p)
@ -270,13 +334,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy2 rxy1 wy2 wx1 c1 c2
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step wy2: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(1, 5) g;
step wx1: insert into gist_point_tbl (id, p)
@ -287,13 +355,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy2 rxy1 wy2 wx1 c2 c1
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step wy2: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(1, 5) g;
step wx1: insert into gist_point_tbl (id, p)
@ -304,13 +376,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy2 rxy1 wy2 c2 wx1 c1
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step wy2: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(1, 5) g;
step c2: commit;
@ -321,15 +397,19 @@ step c1: commit;
starting permutation: rxy2 wy2 rxy1 wx1 c1 c2
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step wy2: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(1, 5) g;
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step wx1: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(15, 20) g;
step c1: commit;
@ -338,15 +418,19 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy2 wy2 rxy1 wx1 c2 c1
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step wy2: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(1, 5) g;
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step wx1: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(15, 20) g;
step c2: commit;
@ -355,15 +439,19 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy2 wy2 rxy1 c2 wx1 c1
step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500);
sum
sum
-------
2188750
(1 row)
2188750
step wy2: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(1, 5) g;
step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500);
sum
sum
------
311250
(1 row)
311250
step c2: commit;
step wx1: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(15, 20) g;
@ -372,15 +460,19 @@ step c1: commit;
starting permutation: rxy3 wx3 rxy4 c1 wy4 c2
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step wx3: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(12, 18) g;
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step c1: commit;
step wy4: insert into gist_point_tbl (id, p)
select g, point(g*50, g*50) from generate_series(1, 20) g;
@ -388,15 +480,19 @@ step c2: commit;
starting permutation: rxy3 wx3 rxy4 wy4 c1 c2
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step wx3: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(12, 18) g;
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step wy4: insert into gist_point_tbl (id, p)
select g, point(g*50, g*50) from generate_series(1, 20) g;
step c1: commit;
@ -404,15 +500,19 @@ step c2: commit;
starting permutation: rxy3 wx3 rxy4 wy4 c2 c1
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step wx3: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(12, 18) g;
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step wy4: insert into gist_point_tbl (id, p)
select g, point(g*50, g*50) from generate_series(1, 20) g;
step c2: commit;
@ -420,13 +520,17 @@ step c1: commit;
starting permutation: rxy3 rxy4 wx3 c1 wy4 c2
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step wx3: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(12, 18) g;
step c1: commit;
@ -436,13 +540,17 @@ step c2: commit;
starting permutation: rxy3 rxy4 wx3 wy4 c1 c2
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step wx3: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(12, 18) g;
step wy4: insert into gist_point_tbl (id, p)
@ -452,13 +560,17 @@ step c2: commit;
starting permutation: rxy3 rxy4 wx3 wy4 c2 c1
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step wx3: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(12, 18) g;
step wy4: insert into gist_point_tbl (id, p)
@ -468,13 +580,17 @@ step c1: commit;
starting permutation: rxy3 rxy4 wy4 wx3 c1 c2
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step wy4: insert into gist_point_tbl (id, p)
select g, point(g*50, g*50) from generate_series(1, 20) g;
step wx3: insert into gist_point_tbl (id, p)
@ -484,13 +600,17 @@ step c2: commit;
starting permutation: rxy3 rxy4 wy4 wx3 c2 c1
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step wy4: insert into gist_point_tbl (id, p)
select g, point(g*50, g*50) from generate_series(1, 20) g;
step wx3: insert into gist_point_tbl (id, p)
@ -500,13 +620,17 @@ step c1: commit;
starting permutation: rxy3 rxy4 wy4 c2 wx3 c1
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step wy4: insert into gist_point_tbl (id, p)
select g, point(g*50, g*50) from generate_series(1, 20) g;
step c2: commit;
@ -516,13 +640,17 @@ step c1: commit;
starting permutation: rxy4 rxy3 wx3 c1 wy4 c2
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step wx3: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(12, 18) g;
step c1: commit;
@ -532,13 +660,17 @@ step c2: commit;
starting permutation: rxy4 rxy3 wx3 wy4 c1 c2
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step wx3: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(12, 18) g;
step wy4: insert into gist_point_tbl (id, p)
@ -548,13 +680,17 @@ step c2: commit;
starting permutation: rxy4 rxy3 wx3 wy4 c2 c1
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step wx3: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(12, 18) g;
step wy4: insert into gist_point_tbl (id, p)
@ -564,13 +700,17 @@ step c1: commit;
starting permutation: rxy4 rxy3 wy4 wx3 c1 c2
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step wy4: insert into gist_point_tbl (id, p)
select g, point(g*50, g*50) from generate_series(1, 20) g;
step wx3: insert into gist_point_tbl (id, p)
@ -580,13 +720,17 @@ step c2: commit;
starting permutation: rxy4 rxy3 wy4 wx3 c2 c1
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step wy4: insert into gist_point_tbl (id, p)
select g, point(g*50, g*50) from generate_series(1, 20) g;
step wx3: insert into gist_point_tbl (id, p)
@ -596,13 +740,17 @@ step c1: commit;
starting permutation: rxy4 rxy3 wy4 c2 wx3 c1
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step wy4: insert into gist_point_tbl (id, p)
select g, point(g*50, g*50) from generate_series(1, 20) g;
step c2: commit;
@ -612,15 +760,19 @@ step c1: commit;
starting permutation: rxy4 wy4 rxy3 wx3 c1 c2
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step wy4: insert into gist_point_tbl (id, p)
select g, point(g*50, g*50) from generate_series(1, 20) g;
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step wx3: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(12, 18) g;
step c1: commit;
@ -628,15 +780,19 @@ step c2: commit;
starting permutation: rxy4 wy4 rxy3 wx3 c2 c1
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step wy4: insert into gist_point_tbl (id, p)
select g, point(g*50, g*50) from generate_series(1, 20) g;
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step wx3: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(12, 18) g;
step c2: commit;
@ -644,15 +800,19 @@ step c1: commit;
starting permutation: rxy4 wy4 rxy3 c2 wx3 c1
step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000);
sum
sum
-----
49500
(1 row)
49500
step wy4: insert into gist_point_tbl (id, p)
select g, point(g*50, g*50) from generate_series(1, 20) g;
step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000);
sum
sum
-------
3202000
(1 row)
3202000
step c2: commit;
step wx3: insert into gist_point_tbl (id, p)
select g, point(g*500, g*500) from generate_series(12, 18) g;

View File

@ -2,79 +2,99 @@ Parsed test spec with 2 sessions
starting permutation: rxy1 wx1 c1 rxy2 wy2 c2
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx1: insert into hash_tbl (id, p)
select g, 30 from generate_series(41, 50) g;
step c1: commit;
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
600
(1 row)
600
step wy2: insert into hash_tbl (id, p)
select g, 20 from generate_series(51, 60) g;
step c2: commit;
starting permutation: rxy2 wy2 c2 rxy1 wx1 c1
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy2: insert into hash_tbl (id, p)
select g, 20 from generate_series(51, 60) g;
step c2: commit;
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
400
(1 row)
400
step wx1: insert into hash_tbl (id, p)
select g, 30 from generate_series(41, 50) g;
step c1: commit;
starting permutation: rxy3 wx3 c1 rxy4 wy4 c2
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx3: insert into hash_tbl (id, p)
select g, 50 from generate_series(41, 50) g;
step c1: commit;
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy4: insert into hash_tbl (id, p)
select g, 60 from generate_series(51, 60) g;
step c2: commit;
starting permutation: rxy4 wy4 c2 rxy3 wx3 c1
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy4: insert into hash_tbl (id, p)
select g, 60 from generate_series(51, 60) g;
step c2: commit;
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx3: insert into hash_tbl (id, p)
select g, 50 from generate_series(41, 50) g;
step c1: commit;
starting permutation: rxy1 wx1 rxy2 c1 wy2 c2
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx1: insert into hash_tbl (id, p)
select g, 30 from generate_series(41, 50) g;
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step c1: commit;
step wy2: insert into hash_tbl (id, p)
select g, 20 from generate_series(51, 60) g;
@ -83,15 +103,19 @@ step c2: commit;
starting permutation: rxy1 wx1 rxy2 wy2 c1 c2
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx1: insert into hash_tbl (id, p)
select g, 30 from generate_series(41, 50) g;
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy2: insert into hash_tbl (id, p)
select g, 20 from generate_series(51, 60) g;
step c1: commit;
@ -100,15 +124,19 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy1 wx1 rxy2 wy2 c2 c1
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx1: insert into hash_tbl (id, p)
select g, 30 from generate_series(41, 50) g;
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy2: insert into hash_tbl (id, p)
select g, 20 from generate_series(51, 60) g;
step c2: commit;
@ -117,13 +145,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy1 rxy2 wx1 c1 wy2 c2
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wx1: insert into hash_tbl (id, p)
select g, 30 from generate_series(41, 50) g;
step c1: commit;
@ -134,13 +166,17 @@ step c2: commit;
starting permutation: rxy1 rxy2 wx1 wy2 c1 c2
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wx1: insert into hash_tbl (id, p)
select g, 30 from generate_series(41, 50) g;
step wy2: insert into hash_tbl (id, p)
@ -151,13 +187,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy1 rxy2 wx1 wy2 c2 c1
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wx1: insert into hash_tbl (id, p)
select g, 30 from generate_series(41, 50) g;
step wy2: insert into hash_tbl (id, p)
@ -168,13 +208,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy1 rxy2 wy2 wx1 c1 c2
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy2: insert into hash_tbl (id, p)
select g, 20 from generate_series(51, 60) g;
step wx1: insert into hash_tbl (id, p)
@ -185,13 +229,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy1 rxy2 wy2 wx1 c2 c1
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy2: insert into hash_tbl (id, p)
select g, 20 from generate_series(51, 60) g;
step wx1: insert into hash_tbl (id, p)
@ -202,13 +250,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy1 rxy2 wy2 c2 wx1 c1
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy2: insert into hash_tbl (id, p)
select g, 20 from generate_series(51, 60) g;
step c2: commit;
@ -219,13 +271,17 @@ step c1: commit;
starting permutation: rxy2 rxy1 wx1 c1 wy2 c2
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx1: insert into hash_tbl (id, p)
select g, 30 from generate_series(41, 50) g;
step c1: commit;
@ -236,13 +292,17 @@ step c2: commit;
starting permutation: rxy2 rxy1 wx1 wy2 c1 c2
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx1: insert into hash_tbl (id, p)
select g, 30 from generate_series(41, 50) g;
step wy2: insert into hash_tbl (id, p)
@ -253,13 +313,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy2 rxy1 wx1 wy2 c2 c1
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx1: insert into hash_tbl (id, p)
select g, 30 from generate_series(41, 50) g;
step wy2: insert into hash_tbl (id, p)
@ -270,13 +334,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy2 rxy1 wy2 wx1 c1 c2
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wy2: insert into hash_tbl (id, p)
select g, 20 from generate_series(51, 60) g;
step wx1: insert into hash_tbl (id, p)
@ -287,13 +355,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy2 rxy1 wy2 wx1 c2 c1
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wy2: insert into hash_tbl (id, p)
select g, 20 from generate_series(51, 60) g;
step wx1: insert into hash_tbl (id, p)
@ -304,13 +376,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy2 rxy1 wy2 c2 wx1 c1
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wy2: insert into hash_tbl (id, p)
select g, 20 from generate_series(51, 60) g;
step c2: commit;
@ -321,15 +397,19 @@ step c1: commit;
starting permutation: rxy2 wy2 rxy1 wx1 c1 c2
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy2: insert into hash_tbl (id, p)
select g, 20 from generate_series(51, 60) g;
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx1: insert into hash_tbl (id, p)
select g, 30 from generate_series(41, 50) g;
step c1: commit;
@ -338,15 +418,19 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy2 wy2 rxy1 wx1 c2 c1
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy2: insert into hash_tbl (id, p)
select g, 20 from generate_series(51, 60) g;
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx1: insert into hash_tbl (id, p)
select g, 30 from generate_series(41, 50) g;
step c2: commit;
@ -355,15 +439,19 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rxy2 wy2 rxy1 c2 wx1 c1
step rxy2: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy2: insert into hash_tbl (id, p)
select g, 20 from generate_series(51, 60) g;
step rxy1: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step c2: commit;
step wx1: insert into hash_tbl (id, p)
select g, 30 from generate_series(41, 50) g;
@ -372,15 +460,19 @@ step c1: commit;
starting permutation: rxy3 wx3 rxy4 c1 wy4 c2
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx3: insert into hash_tbl (id, p)
select g, 50 from generate_series(41, 50) g;
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step c1: commit;
step wy4: insert into hash_tbl (id, p)
select g, 60 from generate_series(51, 60) g;
@ -388,15 +480,19 @@ step c2: commit;
starting permutation: rxy3 wx3 rxy4 wy4 c1 c2
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx3: insert into hash_tbl (id, p)
select g, 50 from generate_series(41, 50) g;
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy4: insert into hash_tbl (id, p)
select g, 60 from generate_series(51, 60) g;
step c1: commit;
@ -404,15 +500,19 @@ step c2: commit;
starting permutation: rxy3 wx3 rxy4 wy4 c2 c1
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx3: insert into hash_tbl (id, p)
select g, 50 from generate_series(41, 50) g;
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy4: insert into hash_tbl (id, p)
select g, 60 from generate_series(51, 60) g;
step c2: commit;
@ -420,13 +520,17 @@ step c1: commit;
starting permutation: rxy3 rxy4 wx3 c1 wy4 c2
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wx3: insert into hash_tbl (id, p)
select g, 50 from generate_series(41, 50) g;
step c1: commit;
@ -436,13 +540,17 @@ step c2: commit;
starting permutation: rxy3 rxy4 wx3 wy4 c1 c2
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wx3: insert into hash_tbl (id, p)
select g, 50 from generate_series(41, 50) g;
step wy4: insert into hash_tbl (id, p)
@ -452,13 +560,17 @@ step c2: commit;
starting permutation: rxy3 rxy4 wx3 wy4 c2 c1
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wx3: insert into hash_tbl (id, p)
select g, 50 from generate_series(41, 50) g;
step wy4: insert into hash_tbl (id, p)
@ -468,13 +580,17 @@ step c1: commit;
starting permutation: rxy3 rxy4 wy4 wx3 c1 c2
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy4: insert into hash_tbl (id, p)
select g, 60 from generate_series(51, 60) g;
step wx3: insert into hash_tbl (id, p)
@ -484,13 +600,17 @@ step c2: commit;
starting permutation: rxy3 rxy4 wy4 wx3 c2 c1
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy4: insert into hash_tbl (id, p)
select g, 60 from generate_series(51, 60) g;
step wx3: insert into hash_tbl (id, p)
@ -500,13 +620,17 @@ step c1: commit;
starting permutation: rxy3 rxy4 wy4 c2 wx3 c1
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy4: insert into hash_tbl (id, p)
select g, 60 from generate_series(51, 60) g;
step c2: commit;
@ -516,13 +640,17 @@ step c1: commit;
starting permutation: rxy4 rxy3 wx3 c1 wy4 c2
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx3: insert into hash_tbl (id, p)
select g, 50 from generate_series(41, 50) g;
step c1: commit;
@ -532,13 +660,17 @@ step c2: commit;
starting permutation: rxy4 rxy3 wx3 wy4 c1 c2
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx3: insert into hash_tbl (id, p)
select g, 50 from generate_series(41, 50) g;
step wy4: insert into hash_tbl (id, p)
@ -548,13 +680,17 @@ step c2: commit;
starting permutation: rxy4 rxy3 wx3 wy4 c2 c1
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx3: insert into hash_tbl (id, p)
select g, 50 from generate_series(41, 50) g;
step wy4: insert into hash_tbl (id, p)
@ -564,13 +700,17 @@ step c1: commit;
starting permutation: rxy4 rxy3 wy4 wx3 c1 c2
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wy4: insert into hash_tbl (id, p)
select g, 60 from generate_series(51, 60) g;
step wx3: insert into hash_tbl (id, p)
@ -580,13 +720,17 @@ step c2: commit;
starting permutation: rxy4 rxy3 wy4 wx3 c2 c1
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wy4: insert into hash_tbl (id, p)
select g, 60 from generate_series(51, 60) g;
step wx3: insert into hash_tbl (id, p)
@ -596,13 +740,17 @@ step c1: commit;
starting permutation: rxy4 rxy3 wy4 c2 wx3 c1
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wy4: insert into hash_tbl (id, p)
select g, 60 from generate_series(51, 60) g;
step c2: commit;
@ -612,15 +760,19 @@ step c1: commit;
starting permutation: rxy4 wy4 rxy3 wx3 c1 c2
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy4: insert into hash_tbl (id, p)
select g, 60 from generate_series(51, 60) g;
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx3: insert into hash_tbl (id, p)
select g, 50 from generate_series(41, 50) g;
step c1: commit;
@ -628,15 +780,19 @@ step c2: commit;
starting permutation: rxy4 wy4 rxy3 wx3 c2 c1
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy4: insert into hash_tbl (id, p)
select g, 60 from generate_series(51, 60) g;
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step wx3: insert into hash_tbl (id, p)
select g, 50 from generate_series(41, 50) g;
step c2: commit;
@ -644,15 +800,19 @@ step c1: commit;
starting permutation: rxy4 wy4 rxy3 c2 wx3 c1
step rxy4: select sum(p) from hash_tbl where p=30;
sum
sum
---
300
(1 row)
300
step wy4: insert into hash_tbl (id, p)
select g, 60 from generate_series(51, 60) g;
step rxy3: select sum(p) from hash_tbl where p=20;
sum
sum
---
200
(1 row)
200
step c2: commit;
step wx3: insert into hash_tbl (id, p)
select g, 50 from generate_series(41, 50) g;

View File

@ -4,15 +4,19 @@ starting permutation: b1 b2 r1 r2 w1 w2 c1 c2
step b1: BEGIN ISOLATION LEVEL SERIALIZABLE;
step b2: BEGIN ISOLATION LEVEL SERIALIZABLE;
step r1: SELECT * FROM test WHERE i IN (5, 7)
i t
i|t
-+----------------
5|apple
7|pear_hot_updated
(2 rows)
5 apple
7 pear_hot_updated
step r2: SELECT * FROM test WHERE i IN (5, 7)
i t
i|t
-+----------------
5|apple
7|pear_hot_updated
(2 rows)
5 apple
7 pear_hot_updated
step w1: UPDATE test SET t = 'pear_xact1' WHERE i = 7
step w2: UPDATE test SET t = 'apple_xact2' WHERE i = 5
step c1: COMMIT;

View File

@ -13,6 +13,8 @@ step r2:
SET enable_bitmapscan to off;
SELECT * FROM cic_test WHERE a = 1;
a
a
-
1
(1 row)
1

File diff suppressed because it is too large Load Diff

View File

@ -2,28 +2,36 @@ Parsed test spec with 2 sessions
starting permutation: rx1 wy1 c1 ry2 wx2 c2
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step c1: COMMIT;
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
1
(1 row)
1
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step c2: COMMIT;
starting permutation: rx1 wy1 ry2 c1 wx2 c2
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step c1: COMMIT;
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -31,14 +39,18 @@ step c2: COMMIT;
starting permutation: rx1 wy1 ry2 wx2 c1 c2
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step c1: COMMIT;
step c2: COMMIT;
@ -46,14 +58,18 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 wy1 ry2 wx2 c2 c1
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step c2: COMMIT;
step c1: COMMIT;
@ -61,13 +77,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 ry2 wy1 c1 wx2 c2
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step c1: COMMIT;
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
@ -76,13 +96,17 @@ step c2: COMMIT;
starting permutation: rx1 ry2 wy1 wx2 c1 c2
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step c1: COMMIT;
@ -91,13 +115,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 ry2 wy1 wx2 c2 c1
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step c2: COMMIT;
@ -106,13 +134,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 ry2 wx2 wy1 c1 c2
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step c1: COMMIT;
@ -121,13 +153,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 ry2 wx2 wy1 c2 c1
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step c2: COMMIT;
@ -136,13 +172,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 ry2 wx2 c2 wy1 c1
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step c2: COMMIT;
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
@ -151,13 +191,17 @@ step c1: COMMIT;
starting permutation: ry2 rx1 wy1 c1 wx2 c2
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step c1: COMMIT;
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
@ -166,13 +210,17 @@ step c2: COMMIT;
starting permutation: ry2 rx1 wy1 wx2 c1 c2
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step c1: COMMIT;
@ -181,13 +229,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 rx1 wy1 wx2 c2 c1
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step c2: COMMIT;
@ -196,13 +248,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 rx1 wx2 wy1 c1 c2
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step c1: COMMIT;
@ -211,13 +267,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 rx1 wx2 wy1 c2 c1
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step c2: COMMIT;
@ -226,13 +286,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 rx1 wx2 c2 wy1 c1
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step c2: COMMIT;
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
@ -241,14 +305,18 @@ step c1: COMMIT;
starting permutation: ry2 wx2 rx1 wy1 c1 c2
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step c1: COMMIT;
step c2: COMMIT;
@ -256,14 +324,18 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 wx2 rx1 wy1 c2 c1
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step c2: COMMIT;
step c1: COMMIT;
@ -271,14 +343,18 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 wx2 rx1 c2 wy1 c1
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
1
(1 row)
1
step c2: COMMIT;
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
ERROR: could not serialize access due to read/write dependencies among transactions
@ -286,14 +362,18 @@ step c1: COMMIT;
starting permutation: ry2 wx2 c2 rx1 wy1 c1
step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
count
count
-----
0
(1 row)
0
step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
step c2: COMMIT;
step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
step c1: COMMIT;

View File

@ -2,17 +2,23 @@ Parsed test spec with 3 sessions
starting permutation: s2rx s2ry s1ry s1wy s1c s2wx s2c s3c
step s2rx: SELECT balance FROM bank_account WHERE id = 'X';
balance
balance
-------
0
(1 row)
0
step s2ry: SELECT balance FROM bank_account WHERE id = 'Y';
balance
balance
-------
0
(1 row)
0
step s1ry: SELECT balance FROM bank_account WHERE id = 'Y';
balance
balance
-------
0
(1 row)
0
step s1wy: UPDATE bank_account SET balance = 20 WHERE id = 'Y';
step s1c: COMMIT;
step s2wx: UPDATE bank_account SET balance = -11 WHERE id = 'X';
@ -21,24 +27,32 @@ step s3c: COMMIT;
starting permutation: s2rx s2ry s1ry s1wy s1c s3r s3c s2wx
step s2rx: SELECT balance FROM bank_account WHERE id = 'X';
balance
balance
-------
0
(1 row)
0
step s2ry: SELECT balance FROM bank_account WHERE id = 'Y';
balance
balance
-------
0
(1 row)
0
step s1ry: SELECT balance FROM bank_account WHERE id = 'Y';
balance
balance
-------
0
(1 row)
0
step s1wy: UPDATE bank_account SET balance = 20 WHERE id = 'Y';
step s1c: COMMIT;
step s3r: SELECT id, balance FROM bank_account WHERE id IN ('X', 'Y') ORDER BY id;
id balance
id|balance
--+-------
X | 0
Y | 20
(2 rows)
X 0
Y 20
step s3c: COMMIT;
step s2wx: UPDATE bank_account SET balance = -11 WHERE id = 'X';
ERROR: could not serialize access due to read/write dependencies among transactions

View File

@ -2,25 +2,33 @@ Parsed test spec with 3 sessions
starting permutation: s2rx s2ry s1ry s1wy s1c s3r s2wx s2c s3c
step s2rx: SELECT balance FROM bank_account WHERE id = 'X';
balance
balance
-------
0
(1 row)
0
step s2ry: SELECT balance FROM bank_account WHERE id = 'Y';
balance
balance
-------
0
(1 row)
0
step s1ry: SELECT balance FROM bank_account WHERE id = 'Y';
balance
balance
-------
0
(1 row)
0
step s1wy: UPDATE bank_account SET balance = 20 WHERE id = 'Y';
step s1c: COMMIT;
step s3r: SELECT id, balance FROM bank_account WHERE id IN ('X', 'Y') ORDER BY id; <waiting ...>
step s2wx: UPDATE bank_account SET balance = -11 WHERE id = 'X';
step s2c: COMMIT;
step s3r: <... completed>
id balance
id|balance
--+-------
X | -11
Y | 20
(2 rows)
X -11
Y 20
step s3c: COMMIT;

View File

@ -2,24 +2,32 @@ Parsed test spec with 3 sessions
starting permutation: s2rx s2ry s1ry s1wy s1c s3r s2wx s2c s3c
step s2rx: SELECT balance FROM bank_account WHERE id = 'X';
balance
balance
-------
0
(1 row)
0
step s2ry: SELECT balance FROM bank_account WHERE id = 'Y';
balance
balance
-------
0
(1 row)
0
step s1ry: SELECT balance FROM bank_account WHERE id = 'Y';
balance
balance
-------
0
(1 row)
0
step s1wy: UPDATE bank_account SET balance = 20 WHERE id = 'Y';
step s1c: COMMIT;
step s3r: SELECT id, balance FROM bank_account WHERE id IN ('X', 'Y') ORDER BY id;
id balance
id|balance
--+-------
X | 0
Y | 20
(2 rows)
X 0
Y 20
step s2wx: UPDATE bank_account SET balance = -11 WHERE id = 'X';
step s2c: COMMIT;
step s3c: COMMIT;

View File

@ -2,10 +2,14 @@ Parsed test spec with 2 sessions
starting permutation: r1 r2 w1 w2 c1 c2
step r1: SELECT * FROM test WHERE i = 42;
i
i
-
(0 rows)
step r2: SELECT * FROM test WHERE i = 42;
i
i
-
(0 rows)
step w1: INSERT INTO test VALUES (42);
step w2: INSERT INTO test VALUES (42); <waiting ...>
@ -16,14 +20,18 @@ step c2: COMMIT;
starting permutation: r1 w1 c1 r2 w2 c2
step r1: SELECT * FROM test WHERE i = 42;
i
i
-
(0 rows)
step w1: INSERT INTO test VALUES (42);
step c1: COMMIT;
step r2: SELECT * FROM test WHERE i = 42;
i
i
--
42
(1 row)
42
step w2: INSERT INTO test VALUES (42);
ERROR: duplicate key value violates unique constraint "test_pkey"
step c2: COMMIT;

View File

@ -2,9 +2,11 @@ Parsed test spec with 2 sessions
starting permutation: rw1 rw2 c1 c2
step rw1: SELECT insert_unique(1, '1');
insert_unique
insert_unique
-------------
(1 row)
step rw2: SELECT insert_unique(1, '2'); <waiting ...>
step c1: COMMIT;
step rw2: <... completed>

View File

@ -2,13 +2,17 @@ Parsed test spec with 2 sessions
starting permutation: r1 r2 w1 w2 c1 c2
step r1: SELECT COALESCE(MAX(invoice_number) + 1, 1) FROM invoice WHERE year = 2016;
coalesce
coalesce
--------
3
(1 row)
3
step r2: SELECT COALESCE(MAX(invoice_number) + 1, 1) FROM invoice WHERE year = 2016;
coalesce
coalesce
--------
3
(1 row)
3
step w1: INSERT INTO invoice VALUES (2016, 3);
step w2: INSERT INTO invoice VALUES (2016, 3); <waiting ...>
step c1: COMMIT;
@ -18,9 +22,11 @@ step c2: COMMIT;
starting permutation: r1 w1 w2 c1 c2
step r1: SELECT COALESCE(MAX(invoice_number) + 1, 1) FROM invoice WHERE year = 2016;
coalesce
coalesce
--------
3
(1 row)
3
step w1: INSERT INTO invoice VALUES (2016, 3);
step w2: INSERT INTO invoice VALUES (2016, 3); <waiting ...>
step c1: COMMIT;
@ -30,9 +36,11 @@ step c2: COMMIT;
starting permutation: r2 w1 w2 c1 c2
step r2: SELECT COALESCE(MAX(invoice_number) + 1, 1) FROM invoice WHERE year = 2016;
coalesce
coalesce
--------
3
(1 row)
3
step w1: INSERT INTO invoice VALUES (2016, 3);
step w2: INSERT INTO invoice VALUES (2016, 3); <waiting ...>
step c1: COMMIT;

View File

@ -2,10 +2,14 @@ Parsed test spec with 2 sessions
starting permutation: r1 r2 w1 w2 c1 c2
step r1: SELECT * FROM test;
i
i
-
(0 rows)
step r2: SELECT * FROM test;
i
i
-
(0 rows)
step w1: INSERT INTO test VALUES (42);
step w2: INSERT INTO test VALUES (42); <waiting ...>
@ -16,14 +20,18 @@ step c2: COMMIT;
starting permutation: r1 w1 c1 r2 w2 c2
step r1: SELECT * FROM test;
i
i
-
(0 rows)
step w1: INSERT INTO test VALUES (42);
step c1: COMMIT;
step r2: SELECT * FROM test;
i
i
--
42
(1 row)
42
step w2: INSERT INTO test VALUES (42);
ERROR: duplicate key value violates unique constraint "test_pkey"
step c2: COMMIT;

File diff suppressed because it is too large Load Diff

View File

@ -2,35 +2,47 @@ Parsed test spec with 2 sessions
starting permutation: rx1 wy1 c1 rx2 ry2 wx2 c2
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step c1: COMMIT;
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
1
(1 row)
1
step wx2: DELETE FROM a WHERE i = 1;
step c2: COMMIT;
starting permutation: rx1 wy1 rx2 c1 ry2 wx2 c2
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step c1: COMMIT;
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -38,16 +50,22 @@ step c2: COMMIT;
starting permutation: rx1 wy1 rx2 ry2 c1 wx2 c2
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step c1: COMMIT;
step wx2: DELETE FROM a WHERE i = 1;
@ -56,16 +74,22 @@ step c2: COMMIT;
starting permutation: rx1 wy1 rx2 ry2 wx2 c1 c2
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
step c1: COMMIT;
@ -74,16 +98,22 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 wy1 rx2 ry2 wx2 c2 c1
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
step c2: COMMIT;
@ -92,17 +122,23 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 rx2 wy1 c1 ry2 wx2 c2
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step c1: COMMIT;
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -110,16 +146,22 @@ step c2: COMMIT;
starting permutation: rx1 rx2 wy1 ry2 c1 wx2 c2
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step c1: COMMIT;
step wx2: DELETE FROM a WHERE i = 1;
@ -128,16 +170,22 @@ step c2: COMMIT;
starting permutation: rx1 rx2 wy1 ry2 wx2 c1 c2
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
step c1: COMMIT;
@ -146,16 +194,22 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 rx2 wy1 ry2 wx2 c2 c1
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
step c2: COMMIT;
@ -164,15 +218,21 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 rx2 ry2 wy1 c1 wx2 c2
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wy1: INSERT INTO b VALUES (1);
step c1: COMMIT;
@ -182,15 +242,21 @@ step c2: COMMIT;
starting permutation: rx1 rx2 ry2 wy1 wx2 c1 c2
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wy1: INSERT INTO b VALUES (1);
step wx2: DELETE FROM a WHERE i = 1;
@ -200,15 +266,21 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 rx2 ry2 wy1 wx2 c2 c1
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wy1: INSERT INTO b VALUES (1);
step wx2: DELETE FROM a WHERE i = 1;
@ -218,15 +290,21 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 rx2 ry2 wx2 wy1 c1 c2
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
step wy1: INSERT INTO b VALUES (1);
@ -236,15 +314,21 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 rx2 ry2 wx2 wy1 c2 c1
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
step wy1: INSERT INTO b VALUES (1);
@ -254,15 +338,21 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 rx2 ry2 wx2 c2 wy1 c1
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
step c2: COMMIT;
@ -272,17 +362,23 @@ step c1: COMMIT;
starting permutation: rx2 rx1 wy1 c1 ry2 wx2 c2
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step c1: COMMIT;
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -290,16 +386,22 @@ step c2: COMMIT;
starting permutation: rx2 rx1 wy1 ry2 c1 wx2 c2
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step c1: COMMIT;
step wx2: DELETE FROM a WHERE i = 1;
@ -308,16 +410,22 @@ step c2: COMMIT;
starting permutation: rx2 rx1 wy1 ry2 wx2 c1 c2
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
step c1: COMMIT;
@ -326,16 +434,22 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx2 rx1 wy1 ry2 wx2 c2 c1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
step c2: COMMIT;
@ -344,15 +458,21 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx2 rx1 ry2 wy1 c1 wx2 c2
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wy1: INSERT INTO b VALUES (1);
step c1: COMMIT;
@ -362,15 +482,21 @@ step c2: COMMIT;
starting permutation: rx2 rx1 ry2 wy1 wx2 c1 c2
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wy1: INSERT INTO b VALUES (1);
step wx2: DELETE FROM a WHERE i = 1;
@ -380,15 +506,21 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx2 rx1 ry2 wy1 wx2 c2 c1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wy1: INSERT INTO b VALUES (1);
step wx2: DELETE FROM a WHERE i = 1;
@ -398,15 +530,21 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx2 rx1 ry2 wx2 wy1 c1 c2
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
step wy1: INSERT INTO b VALUES (1);
@ -416,15 +554,21 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx2 rx1 ry2 wx2 wy1 c2 c1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
step wy1: INSERT INTO b VALUES (1);
@ -434,15 +578,21 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx2 rx1 ry2 wx2 c2 wy1 c1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
step c2: COMMIT;
@ -452,16 +602,22 @@ step c1: COMMIT;
starting permutation: rx2 ry2 rx1 wy1 c1 wx2 c2
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step c1: COMMIT;
step wx2: DELETE FROM a WHERE i = 1;
@ -470,16 +626,22 @@ step c2: COMMIT;
starting permutation: rx2 ry2 rx1 wy1 wx2 c1 c2
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step wx2: DELETE FROM a WHERE i = 1;
step c1: COMMIT;
@ -488,16 +650,22 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx2 ry2 rx1 wy1 wx2 c2 c1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step wx2: DELETE FROM a WHERE i = 1;
step c2: COMMIT;
@ -506,16 +674,22 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx2 ry2 rx1 wx2 wy1 c1 c2
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wx2: DELETE FROM a WHERE i = 1;
step wy1: INSERT INTO b VALUES (1);
step c1: COMMIT;
@ -524,16 +698,22 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx2 ry2 rx1 wx2 wy1 c2 c1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wx2: DELETE FROM a WHERE i = 1;
step wy1: INSERT INTO b VALUES (1);
step c2: COMMIT;
@ -542,16 +722,22 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx2 ry2 rx1 wx2 c2 wy1 c1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wx2: DELETE FROM a WHERE i = 1;
step c2: COMMIT;
step wy1: INSERT INTO b VALUES (1);
@ -560,17 +746,23 @@ step c1: COMMIT;
starting permutation: rx2 ry2 wx2 rx1 wy1 c1 c2
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step c1: COMMIT;
step c2: COMMIT;
@ -578,17 +770,23 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx2 ry2 wx2 rx1 wy1 c2 c1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step wy1: INSERT INTO b VALUES (1);
step c2: COMMIT;
step c1: COMMIT;
@ -596,17 +794,23 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx2 ry2 wx2 rx1 c2 wy1 c1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step c2: COMMIT;
step wy1: INSERT INTO b VALUES (1);
ERROR: could not serialize access due to read/write dependencies among transactions
@ -614,16 +818,22 @@ step c1: COMMIT;
starting permutation: rx2 ry2 wx2 c2 rx1 wy1 c1
step rx2: SELECT i FROM a WHERE i = 1;
i
i
-
1
(1 row)
1
step ry2: SELECT a_id FROM b WHERE a_id = 1;
a_id
a_id
----
(0 rows)
step wx2: DELETE FROM a WHERE i = 1;
step c2: COMMIT;
step rx1: SELECT i FROM a WHERE i = 1;
i
i
-
(0 rows)
step wy1: INSERT INTO b VALUES (1);
step c1: COMMIT;

View File

@ -3,9 +3,11 @@ Parsed test spec with 3 sessions
starting permutation: reindex sel1 upd2 ins2 del2 end1 end2
step reindex: REINDEX TABLE CONCURRENTLY reind_con_tab;
step sel1: SELECT data FROM reind_con_tab WHERE id = 3;
data
data
----
aaaa
(1 row)
aaaa
step upd2: UPDATE reind_con_tab SET data = 'bbbb' WHERE id = 3;
step ins2: INSERT INTO reind_con_tab(data) VALUES ('cccc');
step del2: DELETE FROM reind_con_tab WHERE data = 'cccc';
@ -14,9 +16,11 @@ step end2: COMMIT;
starting permutation: sel1 reindex upd2 ins2 del2 end1 end2
step sel1: SELECT data FROM reind_con_tab WHERE id = 3;
data
data
----
aaaa
(1 row)
aaaa
step reindex: REINDEX TABLE CONCURRENTLY reind_con_tab; <waiting ...>
step upd2: UPDATE reind_con_tab SET data = 'bbbb' WHERE id = 3;
step ins2: INSERT INTO reind_con_tab(data) VALUES ('cccc');
@ -27,9 +31,11 @@ step reindex: <... completed>
starting permutation: sel1 upd2 reindex ins2 del2 end1 end2
step sel1: SELECT data FROM reind_con_tab WHERE id = 3;
data
data
----
aaaa
(1 row)
aaaa
step upd2: UPDATE reind_con_tab SET data = 'bbbb' WHERE id = 3;
step reindex: REINDEX TABLE CONCURRENTLY reind_con_tab; <waiting ...>
step ins2: INSERT INTO reind_con_tab(data) VALUES ('cccc');
@ -40,9 +46,11 @@ step reindex: <... completed>
starting permutation: sel1 upd2 ins2 reindex del2 end1 end2
step sel1: SELECT data FROM reind_con_tab WHERE id = 3;
data
data
----
aaaa
(1 row)
aaaa
step upd2: UPDATE reind_con_tab SET data = 'bbbb' WHERE id = 3;
step ins2: INSERT INTO reind_con_tab(data) VALUES ('cccc');
step reindex: REINDEX TABLE CONCURRENTLY reind_con_tab; <waiting ...>
@ -53,9 +61,11 @@ step reindex: <... completed>
starting permutation: sel1 upd2 ins2 del2 reindex end1 end2
step sel1: SELECT data FROM reind_con_tab WHERE id = 3;
data
data
----
aaaa
(1 row)
aaaa
step upd2: UPDATE reind_con_tab SET data = 'bbbb' WHERE id = 3;
step ins2: INSERT INTO reind_con_tab(data) VALUES ('cccc');
step del2: DELETE FROM reind_con_tab WHERE data = 'cccc';
@ -66,9 +76,11 @@ step reindex: <... completed>
starting permutation: sel1 upd2 ins2 del2 end1 reindex end2
step sel1: SELECT data FROM reind_con_tab WHERE id = 3;
data
data
----
aaaa
(1 row)
aaaa
step upd2: UPDATE reind_con_tab SET data = 'bbbb' WHERE id = 3;
step ins2: INSERT INTO reind_con_tab(data) VALUES ('cccc');
step del2: DELETE FROM reind_con_tab WHERE data = 'cccc';

View File

@ -4,9 +4,11 @@ starting permutation: wxry1 c1 r2 wyrx2 c2
step wxry1: INSERT INTO child (parent_id) VALUES (0);
step c1: COMMIT;
step r2: SELECT TRUE;
bool
bool
----
t
(1 row)
t
step wyrx2: DELETE FROM parent WHERE parent_id = 0;
ERROR: child row exists
step c2: COMMIT;
@ -14,9 +16,11 @@ step c2: COMMIT;
starting permutation: wxry1 r2 c1 wyrx2 c2
step wxry1: INSERT INTO child (parent_id) VALUES (0);
step r2: SELECT TRUE;
bool
bool
----
t
(1 row)
t
step c1: COMMIT;
step wyrx2: DELETE FROM parent WHERE parent_id = 0;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -25,9 +29,11 @@ step c2: COMMIT;
starting permutation: wxry1 r2 wyrx2 c1 c2
step wxry1: INSERT INTO child (parent_id) VALUES (0);
step r2: SELECT TRUE;
bool
bool
----
t
(1 row)
t
step wyrx2: DELETE FROM parent WHERE parent_id = 0;
step c1: COMMIT;
step c2: COMMIT;
@ -36,9 +42,11 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: wxry1 r2 wyrx2 c2 c1
step wxry1: INSERT INTO child (parent_id) VALUES (0);
step r2: SELECT TRUE;
bool
bool
----
t
(1 row)
t
step wyrx2: DELETE FROM parent WHERE parent_id = 0;
step c2: COMMIT;
step c1: COMMIT;
@ -46,9 +54,11 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: r2 wxry1 c1 wyrx2 c2
step r2: SELECT TRUE;
bool
bool
----
t
(1 row)
t
step wxry1: INSERT INTO child (parent_id) VALUES (0);
step c1: COMMIT;
step wyrx2: DELETE FROM parent WHERE parent_id = 0;
@ -57,9 +67,11 @@ step c2: COMMIT;
starting permutation: r2 wxry1 wyrx2 c1 c2
step r2: SELECT TRUE;
bool
bool
----
t
(1 row)
t
step wxry1: INSERT INTO child (parent_id) VALUES (0);
step wyrx2: DELETE FROM parent WHERE parent_id = 0;
step c1: COMMIT;
@ -68,9 +80,11 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: r2 wxry1 wyrx2 c2 c1
step r2: SELECT TRUE;
bool
bool
----
t
(1 row)
t
step wxry1: INSERT INTO child (parent_id) VALUES (0);
step wyrx2: DELETE FROM parent WHERE parent_id = 0;
step c2: COMMIT;
@ -79,9 +93,11 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: r2 wyrx2 wxry1 c1 c2
step r2: SELECT TRUE;
bool
bool
----
t
(1 row)
t
step wyrx2: DELETE FROM parent WHERE parent_id = 0;
step wxry1: INSERT INTO child (parent_id) VALUES (0);
step c1: COMMIT;
@ -90,9 +106,11 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: r2 wyrx2 wxry1 c2 c1
step r2: SELECT TRUE;
bool
bool
----
t
(1 row)
t
step wyrx2: DELETE FROM parent WHERE parent_id = 0;
step wxry1: INSERT INTO child (parent_id) VALUES (0);
step c2: COMMIT;
@ -101,9 +119,11 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: r2 wyrx2 c2 wxry1 c1
step r2: SELECT TRUE;
bool
bool
----
t
(1 row)
t
step wyrx2: DELETE FROM parent WHERE parent_id = 0;
step c2: COMMIT;
step wxry1: INSERT INTO child (parent_id) VALUES (0);

View File

@ -18,67 +18,73 @@ step s1restart: ALTER SEQUENCE seq1 RESTART WITH 5;
step s2nv: SELECT nextval('seq1') FROM generate_series(1, 15); <waiting ...>
step s1commit: COMMIT;
step s2nv: <... completed>
nextval
nextval
-------
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(15 rows)
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
starting permutation: s1restart s2nv s1commit
step s1restart: ALTER SEQUENCE seq1 RESTART WITH 5;
step s2nv: SELECT nextval('seq1') FROM generate_series(1, 15); <waiting ...>
step s1commit: COMMIT;
step s2nv: <... completed>
nextval
nextval
-------
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(15 rows)
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
starting permutation: s2begin s2nv s1alter2 s2commit s1commit
step s2begin: BEGIN;
step s2nv: SELECT nextval('seq1') FROM generate_series(1, 15);
nextval
nextval
-------
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(15 rows)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
step s1alter2: ALTER SEQUENCE seq1 MAXVALUE 20; <waiting ...>
step s2commit: COMMIT;
step s1alter2: <... completed>

View File

@ -2,43 +2,49 @@ Parsed test spec with 2 sessions
starting permutation: s1r s2r1 s1c s2r2 s2c
step s1r: SELECT * FROM foo;
a
a
--
1
2
3
4
5
6
7
8
9
10
(10 rows)
1
2
3
4
5
6
7
8
9
10
step s2r1: SELECT * FROM foo;
a
a
--
1
2
3
4
5
6
7
8
9
10
(10 rows)
1
2
3
4
5
6
7
8
9
10
step s1c: COMMIT;
step s2r2: SELECT * FROM foo;
a
a
--
1
2
3
4
5
6
7
8
9
10
(10 rows)
1
2
3
4
5
6
7
8
9
10
step s2c: COMMIT;

View File

@ -2,17 +2,23 @@ Parsed test spec with 3 sessions
starting permutation: s2rx s2ry s1ry s1wy s1c s2wx s2c s3c
step s2rx: SELECT balance FROM bank_account WHERE id = 'X';
balance
balance
-------
0
(1 row)
0
step s2ry: SELECT balance FROM bank_account WHERE id = 'Y';
balance
balance
-------
0
(1 row)
0
step s1ry: SELECT balance FROM bank_account WHERE id = 'Y';
balance
balance
-------
0
(1 row)
0
step s1wy: UPDATE bank_account SET balance = 20 WHERE id = 'Y';
step s1c: COMMIT;
step s2wx: UPDATE bank_account SET balance = -11 WHERE id = 'X';
@ -21,24 +27,32 @@ step s3c: COMMIT;
starting permutation: s2rx s2ry s1ry s1wy s1c s3r s3c s2wx
step s2rx: SELECT balance FROM bank_account WHERE id = 'X';
balance
balance
-------
0
(1 row)
0
step s2ry: SELECT balance FROM bank_account WHERE id = 'Y';
balance
balance
-------
0
(1 row)
0
step s1ry: SELECT balance FROM bank_account WHERE id = 'Y';
balance
balance
-------
0
(1 row)
0
step s1wy: UPDATE bank_account SET balance = 20 WHERE id = 'Y';
step s1c: COMMIT;
step s3r: SELECT id, balance FROM bank_account WHERE id IN ('X', 'Y') ORDER BY id;
id balance
id|balance
--+-------
X | 0
Y | 20
(2 rows)
X 0
Y 20
step s3c: COMMIT;
step s2wx: UPDATE bank_account SET balance = -11 WHERE id = 'X';
ERROR: could not serialize access due to read/write dependencies among transactions

View File

@ -2,48 +2,66 @@ Parsed test spec with 2 sessions
starting permutation: s1a s2a s2b s1b s2c
step s1a: SELECT * FROM queue ORDER BY id FOR SHARE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2a: SELECT * FROM queue ORDER BY id FOR SHARE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1b: COMMIT;
step s2c: COMMIT;
starting permutation: s2a s1a s2b s1b s2c
step s2a: SELECT * FROM queue ORDER BY id FOR SHARE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1a: SELECT * FROM queue ORDER BY id FOR SHARE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1b: COMMIT;
step s2c: COMMIT;
starting permutation: s2a s2b s1a s1b s2c
step s2a: SELECT * FROM queue ORDER BY id FOR SHARE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1a: SELECT * FROM queue ORDER BY id FOR SHARE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1b: COMMIT;
step s2c: COMMIT;

View File

@ -2,18 +2,24 @@ Parsed test spec with 3 sessions
starting permutation: s1a s2a s3a s1b s2b s3b
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE LIMIT 1; <waiting ...>
step s3a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1b: COMMIT;
step s2a: <... completed>
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2b: COMMIT;
step s3b: COMMIT;

View File

@ -3,19 +3,25 @@ Parsed test spec with 2 sessions
starting permutation: s2a s1a s2b s2c s2d s2e s1b s2f
step s2a: SELECT pg_advisory_lock(0);
pg_advisory_lock
----------------
(1 row)
step s1a: SELECT * FROM foo WHERE pg_advisory_lock(0) IS NOT NULL ORDER BY id LIMIT 1 FOR UPDATE SKIP LOCKED; <waiting ...>
step s2b: UPDATE foo SET data = data WHERE id = 1;
step s2c: BEGIN;
step s2d: UPDATE foo SET data = data WHERE id = 1;
step s2e: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1a: <... completed>
id data
id|data
--+----
2|x
(1 row)
2 x
step s1b: COMMIT;
step s2f: COMMIT;

View File

@ -3,16 +3,20 @@ Parsed test spec with 2 sessions
starting permutation: s2a s1a s2b s2c s2d s2e s1b s2f
step s2a: SELECT pg_advisory_lock(0);
pg_advisory_lock
----------------
(1 row)
step s1a: SELECT * FROM foo WHERE pg_advisory_lock(0) IS NOT NULL ORDER BY id LIMIT 1 FOR UPDATE SKIP LOCKED; <waiting ...>
step s2b: UPDATE foo SET data = data WHERE id = 1;
step s2c: BEGIN;
step s2d: UPDATE foo SET data = data WHERE id = 1;
step s2e: SELECT pg_advisory_unlock(0);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1a: <... completed>
ERROR: could not serialize access due to concurrent update
step s1b: COMMIT;

View File

@ -2,400 +2,560 @@ Parsed test spec with 2 sessions
starting permutation: s1a s1b s1c s2a s2b s2c
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1c: COMMIT;
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2c: COMMIT;
starting permutation: s1a s1b s2a s1c s2b s2c
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1c: COMMIT;
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2c: COMMIT;
starting permutation: s1a s1b s2a s2b s1c s2c
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1c: COMMIT;
step s2c: COMMIT;
starting permutation: s1a s1b s2a s2b s2c s1c
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s2c: COMMIT;
step s1c: COMMIT;
starting permutation: s1a s2a s1b s1c s2b s2c
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1c: COMMIT;
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2c: COMMIT;
starting permutation: s1a s2a s1b s2b s1c s2c
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1c: COMMIT;
step s2c: COMMIT;
starting permutation: s1a s2a s1b s2b s2c s1c
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s2c: COMMIT;
step s1c: COMMIT;
starting permutation: s1a s2a s2b s1b s1c s2c
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1c: COMMIT;
step s2c: COMMIT;
starting permutation: s1a s2a s2b s1b s2c s1c
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2c: COMMIT;
step s1c: COMMIT;
starting permutation: s1a s2a s2b s2c s1b s1c
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s2c: COMMIT;
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1c: COMMIT;
starting permutation: s2a s1a s1b s1c s2b s2c
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1c: COMMIT;
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2c: COMMIT;
starting permutation: s2a s1a s1b s2b s1c s2c
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1c: COMMIT;
step s2c: COMMIT;
starting permutation: s2a s1a s1b s2b s2c s1c
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2c: COMMIT;
step s1c: COMMIT;
starting permutation: s2a s1a s2b s1b s1c s2c
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1c: COMMIT;
step s2c: COMMIT;
starting permutation: s2a s1a s2b s1b s2c s1c
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s2c: COMMIT;
step s1c: COMMIT;
starting permutation: s2a s1a s2b s2c s1b s1c
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2c: COMMIT;
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1c: COMMIT;
starting permutation: s2a s2b s1a s1b s1c s2c
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1c: COMMIT;
step s2c: COMMIT;
starting permutation: s2a s2b s1a s1b s2c s1c
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s2c: COMMIT;
step s1c: COMMIT;
starting permutation: s2a s2b s1a s2c s1b s1c
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
2|bar |NEW
(1 row)
2 bar NEW
step s2c: COMMIT;
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1c: COMMIT;
starting permutation: s2a s2b s2c s1a s1b s1c
step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s2c: COMMIT;
step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1;
id data status
id|data|status
--+----+------
1|foo |NEW
(1 row)
1 foo NEW
step s1c: COMMIT;

View File

@ -2,28 +2,36 @@ Parsed test spec with 2 sessions
starting permutation: rx1 wy1 c1 ry2 wx2 c2
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step c1: COMMIT;
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
1
(1 row)
1
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step c2: COMMIT;
starting permutation: rx1 wy1 ry2 c1 wx2 c2
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step c1: COMMIT;
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
ERROR: could not serialize access due to read/write dependencies among transactions
@ -31,14 +39,18 @@ step c2: COMMIT;
starting permutation: rx1 wy1 ry2 wx2 c1 c2
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step c1: COMMIT;
step c2: COMMIT;
@ -46,14 +58,18 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 wy1 ry2 wx2 c2 c1
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step c2: COMMIT;
step c1: COMMIT;
@ -61,13 +77,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 ry2 wy1 c1 wx2 c2
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step c1: COMMIT;
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
@ -76,13 +96,17 @@ step c2: COMMIT;
starting permutation: rx1 ry2 wy1 wx2 c1 c2
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step c1: COMMIT;
@ -91,13 +115,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 ry2 wy1 wx2 c2 c1
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step c2: COMMIT;
@ -106,13 +134,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 ry2 wx2 wy1 c1 c2
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step c1: COMMIT;
@ -121,13 +153,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 ry2 wx2 wy1 c2 c1
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step c2: COMMIT;
@ -136,13 +172,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: rx1 ry2 wx2 c2 wy1 c1
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step c2: COMMIT;
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
@ -151,13 +191,17 @@ step c1: COMMIT;
starting permutation: ry2 rx1 wy1 c1 wx2 c2
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step c1: COMMIT;
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
@ -166,13 +210,17 @@ step c2: COMMIT;
starting permutation: ry2 rx1 wy1 wx2 c1 c2
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step c1: COMMIT;
@ -181,13 +229,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 rx1 wy1 wx2 c2 c1
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step c2: COMMIT;
@ -196,13 +248,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 rx1 wx2 wy1 c1 c2
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step c1: COMMIT;
@ -211,13 +267,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 rx1 wx2 wy1 c2 c1
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step c2: COMMIT;
@ -226,13 +286,17 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 rx1 wx2 c2 wy1 c1
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step c2: COMMIT;
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
@ -241,14 +305,18 @@ step c1: COMMIT;
starting permutation: ry2 wx2 rx1 wy1 c1 c2
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step c1: COMMIT;
step c2: COMMIT;
@ -256,14 +324,18 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 wx2 rx1 wy1 c2 c1
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step c2: COMMIT;
step c1: COMMIT;
@ -271,14 +343,18 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: ry2 wx2 rx1 c2 wy1 c1
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
1
(1 row)
1
step c2: COMMIT;
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
ERROR: could not serialize access due to read/write dependencies among transactions
@ -286,14 +362,18 @@ step c1: COMMIT;
starting permutation: ry2 wx2 c2 rx1 wy1 c1
step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
count
count
-----
0
(1 row)
0
step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
step c2: COMMIT;
step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
count
count
-----
0
(1 row)
0
step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
step c1: COMMIT;

View File

@ -2,10 +2,12 @@ Parsed test spec with 2 sessions
starting permutation: rdtbl sto locktbl
step rdtbl: SELECT * FROM accounts;
accountid balance
accountid|balance
---------+-------
checking | 600
savings | 600
(2 rows)
checking 600
savings 600
step sto: SET statement_timeout = '10ms';
step locktbl: LOCK TABLE accounts; <waiting ...>
step locktbl: <... completed>
@ -13,10 +15,12 @@ ERROR: canceling statement due to statement timeout
starting permutation: rdtbl lto locktbl
step rdtbl: SELECT * FROM accounts;
accountid balance
accountid|balance
---------+-------
checking | 600
savings | 600
(2 rows)
checking 600
savings 600
step lto: SET lock_timeout = '10ms';
step locktbl: LOCK TABLE accounts; <waiting ...>
step locktbl: <... completed>
@ -24,10 +28,12 @@ ERROR: canceling statement due to lock timeout
starting permutation: rdtbl lsto locktbl
step rdtbl: SELECT * FROM accounts;
accountid balance
accountid|balance
---------+-------
checking | 600
savings | 600
(2 rows)
checking 600
savings 600
step lsto: SET lock_timeout = '10ms'; SET statement_timeout = '10s';
step locktbl: LOCK TABLE accounts; <waiting ...>
step locktbl: <... completed>
@ -35,10 +41,12 @@ ERROR: canceling statement due to lock timeout
starting permutation: rdtbl slto locktbl
step rdtbl: SELECT * FROM accounts;
accountid balance
accountid|balance
---------+-------
checking | 600
savings | 600
(2 rows)
checking 600
savings 600
step slto: SET lock_timeout = '10s'; SET statement_timeout = '10ms';
step locktbl: LOCK TABLE accounts; <waiting ...>
step locktbl: <... completed>

View File

@ -3,23 +3,29 @@ Parsed test spec with 2 sessions
starting permutation: wx1 rxy1 c1 wy2 rxy2 c2
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c1: COMMIT;
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
---
800
(1 row)
800
step c2: COMMIT;
starting permutation: wx1 rxy1 wy2 c1 rxy2 c2
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step c1: COMMIT;
step rxy2: SELECT SUM(balance) FROM accounts;
@ -29,14 +35,18 @@ step c2: COMMIT;
starting permutation: wx1 rxy1 wy2 rxy2 c1 c2
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c1: COMMIT;
step c2: COMMIT;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -44,14 +54,18 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: wx1 rxy1 wy2 rxy2 c2 c1
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c2: COMMIT;
step c1: COMMIT;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -60,9 +74,11 @@ starting permutation: wx1 wy2 rxy1 c1 rxy2 c2
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c1: COMMIT;
step rxy2: SELECT SUM(balance) FROM accounts;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -72,13 +88,17 @@ starting permutation: wx1 wy2 rxy1 rxy2 c1 c2
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c1: COMMIT;
step c2: COMMIT;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -87,13 +107,17 @@ starting permutation: wx1 wy2 rxy1 rxy2 c2 c1
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c2: COMMIT;
step c1: COMMIT;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -102,13 +126,17 @@ starting permutation: wx1 wy2 rxy2 rxy1 c1 c2
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c1: COMMIT;
step c2: COMMIT;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -117,13 +145,17 @@ starting permutation: wx1 wy2 rxy2 rxy1 c2 c1
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c2: COMMIT;
step c1: COMMIT;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -132,9 +164,11 @@ starting permutation: wx1 wy2 rxy2 c2 rxy1 c1
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c2: COMMIT;
step rxy1: SELECT SUM(balance) FROM accounts;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -144,9 +178,11 @@ starting permutation: wy2 wx1 rxy1 c1 rxy2 c2
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c1: COMMIT;
step rxy2: SELECT SUM(balance) FROM accounts;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -156,13 +192,17 @@ starting permutation: wy2 wx1 rxy1 rxy2 c1 c2
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c1: COMMIT;
step c2: COMMIT;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -171,13 +211,17 @@ starting permutation: wy2 wx1 rxy1 rxy2 c2 c1
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c2: COMMIT;
step c1: COMMIT;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -186,13 +230,17 @@ starting permutation: wy2 wx1 rxy2 rxy1 c1 c2
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c1: COMMIT;
step c2: COMMIT;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -201,13 +249,17 @@ starting permutation: wy2 wx1 rxy2 rxy1 c2 c1
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c2: COMMIT;
step c1: COMMIT;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -216,9 +268,11 @@ starting permutation: wy2 wx1 rxy2 c2 rxy1 c1
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c2: COMMIT;
step rxy1: SELECT SUM(balance) FROM accounts;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -227,14 +281,18 @@ step c1: COMMIT;
starting permutation: wy2 rxy2 wx1 rxy1 c1 c2
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c1: COMMIT;
step c2: COMMIT;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -242,14 +300,18 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: wy2 rxy2 wx1 rxy1 c2 c1
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c2: COMMIT;
step c1: COMMIT;
ERROR: could not serialize access due to read/write dependencies among transactions
@ -257,9 +319,11 @@ ERROR: could not serialize access due to read/write dependencies among transact
starting permutation: wy2 rxy2 wx1 c2 rxy1 c1
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step c2: COMMIT;
step rxy1: SELECT SUM(balance) FROM accounts;
@ -269,13 +333,17 @@ step c1: COMMIT;
starting permutation: wy2 rxy2 c2 wx1 rxy1 c1
step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
step rxy2: SELECT SUM(balance) FROM accounts;
sum
sum
----
1000
(1 row)
1000
step c2: COMMIT;
step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
step rxy1: SELECT SUM(balance) FROM accounts;
sum
sum
---
800
(1 row)
800
step c1: COMMIT;

View File

@ -3,9 +3,11 @@ Parsed test spec with 2 sessions
starting permutation: s1_begin s1_tab_lookup s2_auth s2_truncate s1_commit s2_reset
step s1_begin: BEGIN;
step s1_tab_lookup: SELECT count(*) >= 0 FROM truncate_tab;
?column?
?column?
--------
t
(1 row)
t
step s2_auth: SET ROLE regress_truncate_conflict;
step s2_truncate: TRUNCATE truncate_tab;
ERROR: permission denied for table truncate_tab
@ -18,9 +20,11 @@ step s2_auth: SET ROLE regress_truncate_conflict;
step s2_truncate: TRUNCATE truncate_tab;
ERROR: permission denied for table truncate_tab
step s1_tab_lookup: SELECT count(*) >= 0 FROM truncate_tab;
?column?
?column?
--------
t
(1 row)
t
step s1_commit: COMMIT;
step s2_reset: RESET ROLE;
@ -28,9 +32,11 @@ starting permutation: s1_begin s2_auth s1_tab_lookup s2_truncate s1_commit s2_re
step s1_begin: BEGIN;
step s2_auth: SET ROLE regress_truncate_conflict;
step s1_tab_lookup: SELECT count(*) >= 0 FROM truncate_tab;
?column?
?column?
--------
t
(1 row)
t
step s2_truncate: TRUNCATE truncate_tab;
ERROR: permission denied for table truncate_tab
step s1_commit: COMMIT;
@ -42,18 +48,22 @@ step s2_truncate: TRUNCATE truncate_tab;
ERROR: permission denied for table truncate_tab
step s1_begin: BEGIN;
step s1_tab_lookup: SELECT count(*) >= 0 FROM truncate_tab;
?column?
?column?
--------
t
(1 row)
t
step s1_commit: COMMIT;
step s2_reset: RESET ROLE;
starting permutation: s1_begin s1_tab_lookup s2_grant s2_auth s2_truncate s1_commit s2_reset
step s1_begin: BEGIN;
step s1_tab_lookup: SELECT count(*) >= 0 FROM truncate_tab;
?column?
?column?
--------
t
(1 row)
t
step s2_grant: GRANT TRUNCATE ON truncate_tab TO regress_truncate_conflict;
step s2_auth: SET ROLE regress_truncate_conflict;
step s2_truncate: TRUNCATE truncate_tab; <waiting ...>
@ -67,9 +77,11 @@ step s2_grant: GRANT TRUNCATE ON truncate_tab TO regress_truncate_conflict;
step s2_auth: SET ROLE regress_truncate_conflict;
step s2_truncate: TRUNCATE truncate_tab;
step s1_tab_lookup: SELECT count(*) >= 0 FROM truncate_tab;
?column?
?column?
--------
t
(1 row)
t
step s1_commit: COMMIT;
step s2_reset: RESET ROLE;
@ -78,9 +90,11 @@ step s1_begin: BEGIN;
step s2_grant: GRANT TRUNCATE ON truncate_tab TO regress_truncate_conflict;
step s2_auth: SET ROLE regress_truncate_conflict;
step s1_tab_lookup: SELECT count(*) >= 0 FROM truncate_tab;
?column?
?column?
--------
t
(1 row)
t
step s2_truncate: TRUNCATE truncate_tab; <waiting ...>
step s1_commit: COMMIT;
step s2_truncate: <... completed>
@ -92,8 +106,10 @@ step s2_auth: SET ROLE regress_truncate_conflict;
step s2_truncate: TRUNCATE truncate_tab;
step s1_begin: BEGIN;
step s1_tab_lookup: SELECT count(*) >= 0 FROM truncate_tab;
?column?
?column?
--------
t
(1 row)
t
step s1_commit: COMMIT;
step s2_reset: RESET ROLE;

View File

@ -3,467 +3,627 @@ Parsed test spec with 2 sessions
starting permutation: s1_begin s1_lcksvpt s1_tuplock1 s2_tuplock1 s1_commit
step s1_begin: BEGIN;
step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo;
a
a
-
1
(1 row)
1
step s1_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE;
a
a
-
1
(1 row)
1
step s2_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE;
a
a
-
1
(1 row)
1
step s1_commit: COMMIT;
starting permutation: s1_begin s1_lcksvpt s1_tuplock1 s2_tuplock2 s1_commit
step s1_begin: BEGIN;
step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo;
a
a
-
1
(1 row)
1
step s1_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE;
a
a
-
1
(1 row)
1
step s2_tuplock2: SELECT * FROM multixact_conflict FOR SHARE;
a
a
-
1
(1 row)
1
step s1_commit: COMMIT;
starting permutation: s1_begin s1_lcksvpt s1_tuplock1 s2_tuplock3 s1_commit
step s1_begin: BEGIN;
step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo;
a
a
-
1
(1 row)
1
step s1_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE;
a
a
-
1
(1 row)
1
step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE;
a
a
-
1
(1 row)
1
step s1_commit: COMMIT;
starting permutation: s1_begin s1_lcksvpt s1_tuplock1 s2_tuplock4 s1_commit
step s1_begin: BEGIN;
step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo;
a
a
-
1
(1 row)
1
step s1_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE;
a
a
-
1
(1 row)
1
step s2_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock4: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_lcksvpt s1_tuplock2 s2_tuplock1 s1_commit
step s1_begin: BEGIN;
step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo;
a
a
-
1
(1 row)
1
step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE;
a
a
-
1
(1 row)
1
step s2_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE;
a
a
-
1
(1 row)
1
step s1_commit: COMMIT;
starting permutation: s1_begin s1_lcksvpt s1_tuplock2 s2_tuplock2 s1_commit
step s1_begin: BEGIN;
step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo;
a
a
-
1
(1 row)
1
step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE;
a
a
-
1
(1 row)
1
step s2_tuplock2: SELECT * FROM multixact_conflict FOR SHARE;
a
a
-
1
(1 row)
1
step s1_commit: COMMIT;
starting permutation: s1_begin s1_lcksvpt s1_tuplock2 s2_tuplock3 s1_commit
step s1_begin: BEGIN;
step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo;
a
a
-
1
(1 row)
1
step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE;
a
a
-
1
(1 row)
1
step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock3: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_lcksvpt s1_tuplock2 s2_tuplock4 s1_commit
step s1_begin: BEGIN;
step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo;
a
a
-
1
(1 row)
1
step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE;
a
a
-
1
(1 row)
1
step s2_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock4: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_lcksvpt s1_tuplock3 s2_tuplock1 s1_commit
step s1_begin: BEGIN;
step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo;
a
a
-
1
(1 row)
1
step s1_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE;
a
a
-
1
(1 row)
1
step s2_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE;
a
a
-
1
(1 row)
1
step s1_commit: COMMIT;
starting permutation: s1_begin s1_lcksvpt s1_tuplock3 s2_tuplock2 s1_commit
step s1_begin: BEGIN;
step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo;
a
a
-
1
(1 row)
1
step s1_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE;
a
a
-
1
(1 row)
1
step s2_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock2: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_lcksvpt s1_tuplock3 s2_tuplock3 s1_commit
step s1_begin: BEGIN;
step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo;
a
a
-
1
(1 row)
1
step s1_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE;
a
a
-
1
(1 row)
1
step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock3: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_lcksvpt s1_tuplock3 s2_tuplock4 s1_commit
step s1_begin: BEGIN;
step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo;
a
a
-
1
(1 row)
1
step s1_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE;
a
a
-
1
(1 row)
1
step s2_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock4: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_lcksvpt s1_tuplock4 s2_tuplock1 s1_commit
step s1_begin: BEGIN;
step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo;
a
a
-
1
(1 row)
1
step s1_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE;
a
a
-
1
(1 row)
1
step s2_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock1: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_lcksvpt s1_tuplock4 s2_tuplock2 s1_commit
step s1_begin: BEGIN;
step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo;
a
a
-
1
(1 row)
1
step s1_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE;
a
a
-
1
(1 row)
1
step s2_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock2: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_lcksvpt s1_tuplock4 s2_tuplock3 s1_commit
step s1_begin: BEGIN;
step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo;
a
a
-
1
(1 row)
1
step s1_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE;
a
a
-
1
(1 row)
1
step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock3: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_lcksvpt s1_tuplock4 s2_tuplock4 s1_commit
step s1_begin: BEGIN;
step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo;
a
a
-
1
(1 row)
1
step s1_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE;
a
a
-
1
(1 row)
1
step s2_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock4: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_tuplock1 s2_tuplock1 s1_commit
step s1_begin: BEGIN;
step s1_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE;
a
a
-
1
(1 row)
1
step s2_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE;
a
a
-
1
(1 row)
1
step s1_commit: COMMIT;
starting permutation: s1_begin s1_tuplock1 s2_tuplock2 s1_commit
step s1_begin: BEGIN;
step s1_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE;
a
a
-
1
(1 row)
1
step s2_tuplock2: SELECT * FROM multixact_conflict FOR SHARE;
a
a
-
1
(1 row)
1
step s1_commit: COMMIT;
starting permutation: s1_begin s1_tuplock1 s2_tuplock3 s1_commit
step s1_begin: BEGIN;
step s1_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE;
a
a
-
1
(1 row)
1
step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE;
a
a
-
1
(1 row)
1
step s1_commit: COMMIT;
starting permutation: s1_begin s1_tuplock1 s2_tuplock4 s1_commit
step s1_begin: BEGIN;
step s1_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE;
a
a
-
1
(1 row)
1
step s2_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock4: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_tuplock2 s2_tuplock1 s1_commit
step s1_begin: BEGIN;
step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE;
a
a
-
1
(1 row)
1
step s2_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE;
a
a
-
1
(1 row)
1
step s1_commit: COMMIT;
starting permutation: s1_begin s1_tuplock2 s2_tuplock2 s1_commit
step s1_begin: BEGIN;
step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE;
a
a
-
1
(1 row)
1
step s2_tuplock2: SELECT * FROM multixact_conflict FOR SHARE;
a
a
-
1
(1 row)
1
step s1_commit: COMMIT;
starting permutation: s1_begin s1_tuplock2 s2_tuplock3 s1_commit
step s1_begin: BEGIN;
step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE;
a
a
-
1
(1 row)
1
step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock3: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_tuplock2 s2_tuplock4 s1_commit
step s1_begin: BEGIN;
step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE;
a
a
-
1
(1 row)
1
step s2_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock4: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_tuplock3 s2_tuplock1 s1_commit
step s1_begin: BEGIN;
step s1_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE;
a
a
-
1
(1 row)
1
step s2_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE;
a
a
-
1
(1 row)
1
step s1_commit: COMMIT;
starting permutation: s1_begin s1_tuplock3 s2_tuplock2 s1_commit
step s1_begin: BEGIN;
step s1_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE;
a
a
-
1
(1 row)
1
step s2_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock2: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_tuplock3 s2_tuplock3 s1_commit
step s1_begin: BEGIN;
step s1_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE;
a
a
-
1
(1 row)
1
step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock3: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_tuplock3 s2_tuplock4 s1_commit
step s1_begin: BEGIN;
step s1_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE;
a
a
-
1
(1 row)
1
step s2_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock4: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_tuplock4 s2_tuplock1 s1_commit
step s1_begin: BEGIN;
step s1_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE;
a
a
-
1
(1 row)
1
step s2_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock1: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_tuplock4 s2_tuplock2 s1_commit
step s1_begin: BEGIN;
step s1_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE;
a
a
-
1
(1 row)
1
step s2_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock2: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_tuplock4 s2_tuplock3 s1_commit
step s1_begin: BEGIN;
step s1_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE;
a
a
-
1
(1 row)
1
step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock3: <... completed>
a
a
-
1
(1 row)
1
starting permutation: s1_begin s1_tuplock4 s2_tuplock4 s1_commit
step s1_begin: BEGIN;
step s1_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE;
a
a
-
1
(1 row)
1
step s2_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; <waiting ...>
step s1_commit: COMMIT;
step s2_tuplock4: <... completed>
a
a
-
1
(1 row)
1

View File

@ -4,9 +4,11 @@ starting permutation: s1b s1update_nokey s2locktuple s1c
step s1b: BEGIN;
step s1update_nokey: INSERT INTO parttab (key, col1, col2) VALUES (1, 'a', 'b') ON CONFLICT (key) DO UPDATE SET col1 = 'x', col2 = 'y';
step s2locktuple: SELECT * FROM parttab FOR KEY SHARE;
col1 key col2
col1|key|col2
----+---+----
a | 1|b
(1 row)
a 1 b
step s1c: COMMIT;
starting permutation: s1b s1update_key s2locktuple s1c
@ -15,6 +17,8 @@ step s1update_key: INSERT INTO parttab (key, col1, col2) VALUES (1, 'a', 'b') ON
step s2locktuple: SELECT * FROM parttab FOR KEY SHARE; <waiting ...>
step s1c: COMMIT;
step s2locktuple: <... completed>
col1 key col2
col1|key|col2
----+---+----
a | 1|b
(1 row)
a 1 b

View File

@ -6,34 +6,44 @@ step s1_advlock:
pg_advisory_lock(285714),
pg_advisory_lock(571428);
pg_advisory_lockpg_advisory_lockpg_advisory_lock
pg_advisory_lock|pg_advisory_lock|pg_advisory_lock
----------------+----------------+----------------
| |
(1 row)
step s2_update: UPDATE pktab SET data = DEFAULT WHERE pg_advisory_lock_shared(142857) IS NOT NULL; <waiting ...>
step s3_update: UPDATE pktab SET data = DEFAULT WHERE pg_advisory_lock_shared(285714) IS NOT NULL; <waiting ...>
step s4_update: UPDATE pktab SET data = DEFAULT WHERE pg_advisory_lock_shared(571428) IS NOT NULL; <waiting ...>
step s1_chain: UPDATE pktab SET data = DEFAULT;
step s1_begin: BEGIN;
step s1_grablock: SELECT * FROM pktab FOR KEY SHARE;
id data
id|data
--+----
1| 2
(1 row)
1 2
step s1_advunlock1: SELECT pg_advisory_unlock(142857); <waiting ...>
step s2_update: <... completed>
step s1_advunlock1: <... completed>
pg_advisory_unlock
------------------
t
(1 row)
t
step s1_advunlock2: SELECT pg_advisory_unlock(285714); <waiting ...>
step s3_update: <... completed>
step s1_advunlock2: <... completed>
pg_advisory_unlock
------------------
t
(1 row)
t
step s1_advunlock3: SELECT pg_advisory_unlock(571428); <waiting ...>
step s4_update: <... completed>
step s1_advunlock3: <... completed>
pg_advisory_unlock
------------------
t
(1 row)
t
step s1_commit: COMMIT;

View File

@ -2,132 +2,172 @@ Parsed test spec with 4 sessions
starting permutation: s1_share s2_for_update s3_share s3_for_update s1_rollback s3_rollback s2_rollback
step s1_share: select id from tlu_job where id = 1 for share;
id
id
--
1
(1 row)
1
step s2_for_update: select id from tlu_job where id = 1 for update; <waiting ...>
step s3_share: select id from tlu_job where id = 1 for share;
id
id
--
1
(1 row)
1
step s3_for_update: select id from tlu_job where id = 1 for update; <waiting ...>
step s1_rollback: rollback;
step s3_for_update: <... completed>
id
id
--
1
(1 row)
1
step s3_rollback: rollback;
step s2_for_update: <... completed>
id
id
--
1
(1 row)
1
step s2_rollback: rollback;
starting permutation: s1_keyshare s2_for_update s3_keyshare s1_update s3_update s1_rollback s3_rollback s2_rollback
step s1_keyshare: select id from tlu_job where id = 1 for key share;
id
id
--
1
(1 row)
1
step s2_for_update: select id from tlu_job where id = 1 for update; <waiting ...>
step s3_keyshare: select id from tlu_job where id = 1 for key share;
id
id
--
1
(1 row)
1
step s1_update: update tlu_job set name = 'b' where id = 1;
step s3_update: update tlu_job set name = 'c' where id = 1; <waiting ...>
step s1_rollback: rollback;
step s3_update: <... completed>
step s3_rollback: rollback;
step s2_for_update: <... completed>
id
id
--
1
(1 row)
1
step s2_rollback: rollback;
starting permutation: s1_keyshare s2_for_update s3_keyshare s1_update s3_update s1_commit s3_rollback s2_rollback
step s1_keyshare: select id from tlu_job where id = 1 for key share;
id
id
--
1
(1 row)
1
step s2_for_update: select id from tlu_job where id = 1 for update; <waiting ...>
step s3_keyshare: select id from tlu_job where id = 1 for key share;
id
id
--
1
(1 row)
1
step s1_update: update tlu_job set name = 'b' where id = 1;
step s3_update: update tlu_job set name = 'c' where id = 1; <waiting ...>
step s1_commit: commit;
step s3_update: <... completed>
step s3_rollback: rollback;
step s2_for_update: <... completed>
id
id
--
1
(1 row)
1
step s2_rollback: rollback;
starting permutation: s1_keyshare s2_for_update s3_keyshare s3_delete s1_rollback s3_rollback s2_rollback
step s1_keyshare: select id from tlu_job where id = 1 for key share;
id
id
--
1
(1 row)
1
step s2_for_update: select id from tlu_job where id = 1 for update; <waiting ...>
step s3_keyshare: select id from tlu_job where id = 1 for key share;
id
id
--
1
(1 row)
1
step s3_delete: delete from tlu_job where id = 1; <waiting ...>
step s1_rollback: rollback;
step s3_delete: <... completed>
step s3_rollback: rollback;
step s2_for_update: <... completed>
id
id
--
1
(1 row)
1
step s2_rollback: rollback;
starting permutation: s1_keyshare s2_for_update s3_keyshare s3_delete s1_rollback s3_commit s2_rollback
step s1_keyshare: select id from tlu_job where id = 1 for key share;
id
id
--
1
(1 row)
1
step s2_for_update: select id from tlu_job where id = 1 for update; <waiting ...>
step s3_keyshare: select id from tlu_job where id = 1 for key share;
id
id
--
1
(1 row)
1
step s3_delete: delete from tlu_job where id = 1; <waiting ...>
step s1_rollback: rollback;
step s3_delete: <... completed>
step s3_commit: commit;
step s2_for_update: <... completed>
id
id
--
(0 rows)
step s2_rollback: rollback;
starting permutation: s1_share s2_for_update s3_for_update s1_rollback s2_rollback s3_rollback
step s1_share: select id from tlu_job where id = 1 for share;
id
id
--
1
(1 row)
1
step s2_for_update: select id from tlu_job where id = 1 for update; <waiting ...>
step s3_for_update: select id from tlu_job where id = 1 for update; <waiting ...>
step s1_rollback: rollback;
step s2_for_update: <... completed>
id
id
--
1
(1 row)
1
step s2_rollback: rollback;
step s3_for_update: <... completed>
id
id
--
1
(1 row)
1
step s3_rollback: rollback;
starting permutation: s1_share s2_update s3_update s1_rollback s2_rollback s3_rollback
step s1_share: select id from tlu_job where id = 1 for share;
id
id
--
1
(1 row)
1
step s2_update: update tlu_job set name = 'b' where id = 1; <waiting ...>
step s3_update: update tlu_job set name = 'c' where id = 1; <waiting ...>
step s1_rollback: rollback;
@ -138,9 +178,11 @@ step s3_rollback: rollback;
starting permutation: s1_share s2_delete s3_delete s1_rollback s2_rollback s3_rollback
step s1_share: select id from tlu_job where id = 1 for share;
id
id
--
1
(1 row)
1
step s2_delete: delete from tlu_job where id = 1; <waiting ...>
step s3_delete: delete from tlu_job where id = 1; <waiting ...>
step s1_rollback: rollback;
@ -151,45 +193,61 @@ step s3_rollback: rollback;
starting permutation: s1_keyshare s3_for_update s2_for_keyshare s1_savept_e s1_share s1_savept_f s1_fornokeyupd s2_fornokeyupd s0_begin s0_keyshare s1_rollback_f s0_keyshare s1_rollback_e s1_rollback s2_rollback s0_rollback s3_rollback
step s1_keyshare: select id from tlu_job where id = 1 for key share;
id
id
--
1
(1 row)
1
step s3_for_update: select id from tlu_job where id = 1 for update; <waiting ...>
step s2_for_keyshare: select id from tlu_job where id = 1 for key share;
id
id
--
1
(1 row)
1
step s1_savept_e: savepoint s1_e;
step s1_share: select id from tlu_job where id = 1 for share;
id
id
--
1
(1 row)
1
step s1_savept_f: savepoint s1_f;
step s1_fornokeyupd: select id from tlu_job where id = 1 for no key update;
id
id
--
1
(1 row)
1
step s2_fornokeyupd: select id from tlu_job where id = 1 for no key update; <waiting ...>
step s0_begin: begin;
step s0_keyshare: select id from tlu_job where id = 1 for key share;
id
id
--
1
(1 row)
1
step s1_rollback_f: rollback to s1_f;
step s0_keyshare: select id from tlu_job where id = 1 for key share;
id
id
--
1
(1 row)
1
step s1_rollback_e: rollback to s1_e;
step s2_fornokeyupd: <... completed>
id
id
--
1
(1 row)
1
step s1_rollback: rollback;
step s2_rollback: rollback;
step s0_rollback: rollback;
step s3_for_update: <... completed>
id
id
--
1
(1 row)
1
step s3_rollback: rollback;

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,9 @@ Parsed test spec with 3 sessions
starting permutation: foo_select bar_insert foo_insert foo_commit trouble_update bar_select bar_commit trouble_abort
step foo_select: SELECT * FROM txn0 WHERE id = 42;
id val
id|val
--+---
(0 rows)
step bar_insert: INSERT INTO txn0 SELECT 42, 'bar_insert';
step foo_insert: INSERT INTO txn1 SELECT 7, 'foo_insert';
@ -15,7 +17,9 @@ step trouble_abort: ABORT;
starting permutation: foo_select bar_insert foo_insert foo_commit trouble_delete bar_select bar_commit trouble_abort
step foo_select: SELECT * FROM txn0 WHERE id = 42;
id val
id|val
--+---
(0 rows)
step bar_insert: INSERT INTO txn0 SELECT 42, 'bar_insert';
step foo_insert: INSERT INTO txn1 SELECT 7, 'foo_insert';

View File

@ -11,9 +11,11 @@ step stats:
select relpages, reltuples from pg_class
where oid='smalltbl'::regclass;
relpages reltuples
relpages|reltuples
--------+---------
1| 21
(1 row)
1 21
starting permutation: modify open fetch1 vac close stats
step modify:
@ -26,9 +28,11 @@ step open:
step fetch1:
fetch next from c1;
dummy
dummy
-----
1
(1 row)
1
step vac:
vacuum smalltbl;
@ -39,9 +43,11 @@ step stats:
select relpages, reltuples from pg_class
where oid='smalltbl'::regclass;
relpages reltuples
relpages|reltuples
--------+---------
1| 20
(1 row)
1 20
starting permutation: modify vac stats
step modify:
@ -54,6 +60,8 @@ step stats:
select relpages, reltuples from pg_class
where oid='smalltbl'::regclass;
relpages reltuples
relpages|reltuples
--------+---------
1| 21
(1 row)
1 21

View File

@ -1089,23 +1089,13 @@ step_has_blocker(PermutationStep *pstep)
static void
printResultSet(PGresult *res)
{
int nFields;
int i,
j;
PQprintOpt popt;
/* first, print out the attribute names */
nFields = PQnfields(res);
for (i = 0; i < nFields; i++)
printf("%-15s", PQfname(res, i));
printf("\n\n");
/* next, print out the rows */
for (i = 0; i < PQntuples(res); i++)
{
for (j = 0; j < nFields; j++)
printf("%-15s", PQgetvalue(res, i, j));
printf("\n");
}
memset(&popt, 0, sizeof(popt));
popt.header = true;
popt.align = true;
popt.fieldSep = "|";
PQprint(stdout, res, &popt);
}
/* notice processor for regular user sessions */

View File

@ -2,38 +2,50 @@ Parsed test spec with 2 sessions
starting permutation: s2check s1b s2b s1i s2summ s1c s2c s2check
step s2check: SELECT * FROM brin_page_items(get_raw_page('brinidx', 2), 'brinidx'::regclass);
itemoffset blknum attnum allnulls hasnulls placeholder value
itemoffset|blknum|attnum|allnulls|hasnulls|placeholder|value
----------+------+------+--------+--------+-----------+--------
1| 0| 1|f |f |f |{1 .. 1}
(1 row)
1 0 1 f f f {1 .. 1}
step s1b: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s2b: BEGIN ISOLATION LEVEL REPEATABLE READ; SELECT 1;
?column?
?column?
--------
1
(1 row)
1
step s1i: INSERT INTO brin_iso VALUES (1000);
step s2summ: SELECT brin_summarize_new_values('brinidx'::regclass);
brin_summarize_new_values
-------------------------
1
(1 row)
1
step s1c: COMMIT;
step s2c: COMMIT;
step s2check: SELECT * FROM brin_page_items(get_raw_page('brinidx', 2), 'brinidx'::regclass);
itemoffset blknum attnum allnulls hasnulls placeholder value
itemoffset|blknum|attnum|allnulls|hasnulls|placeholder|value
----------+------+------+--------+--------+-----------+-----------
1| 0| 1|f |f |f |{1 .. 1}
2| 1| 1|f |f |f |{1 .. 1000}
(2 rows)
1 0 1 f f f {1 .. 1}
2 1 1 f f f {1 .. 1000}
starting permutation: s2check s1b s1i s2vacuum s1c s2check
step s2check: SELECT * FROM brin_page_items(get_raw_page('brinidx', 2), 'brinidx'::regclass);
itemoffset blknum attnum allnulls hasnulls placeholder value
itemoffset|blknum|attnum|allnulls|hasnulls|placeholder|value
----------+------+------+--------+--------+-----------+--------
1| 0| 1|f |f |f |{1 .. 1}
(1 row)
1 0 1 f f f {1 .. 1}
step s1b: BEGIN ISOLATION LEVEL REPEATABLE READ;
step s1i: INSERT INTO brin_iso VALUES (1000);
step s2vacuum: VACUUM brin_iso;
step s1c: COMMIT;
step s2check: SELECT * FROM brin_page_items(get_raw_page('brinidx', 2), 'brinidx'::regclass);
itemoffset blknum attnum allnulls hasnulls placeholder value
itemoffset|blknum|attnum|allnulls|hasnulls|placeholder|value
----------+------+------+--------+--------+-----------+-----------
1| 0| 1|f |f |f |{1 .. 1}
2| 1| 1|f |f |f |{1 .. 1000}
(2 rows)
1 0 1 f f f {1 .. 1}
2 1 1 f f f {1 .. 1000}

View File

@ -3,8 +3,10 @@ Parsed test spec with 2 sessions
starting permutation: s2lock s1exec s2addp s2unlock
step s2lock: SELECT pg_advisory_lock(12345);
pg_advisory_lock
----------------
(1 row)
step s1exec: LOAD 'delay_execution';
SET delay_execution.post_planning_lock_id = 12345;
SELECT * FROM foo WHERE a <> 1 AND a <> (SELECT 3); <waiting ...>
@ -13,9 +15,13 @@ step s2addp: CREATE TABLE foo2 (LIKE foo);
INSERT INTO foo VALUES (2, 'ADD2');
step s2unlock: SELECT pg_advisory_unlock(12345);
pg_advisory_unlock
------------------
t
(1 row)
t
step s1exec: <... completed>
a b
a|b
-+---
4|GHI
(1 row)
4 GHI

Some files were not shown because too many files have changed in this diff Show More